I am trying to get data from Sharepoint custom list in group by using REST API.

I am trying to achieve this in Mobile Application so jquery solution not supported for me.

I just want to get data as clients name wise from my custom list.

There Are Many other entries in list for same clients and i just want all client data just one time not each record of all clients one record for each client.

How can i achieve this any alternate solution is there then please suggest.

Any Help Highly Appreciated.

3 Answers 3


You can use CAML query with REST Service API as mentioned here Using CAML with SharePoint API.

You can build CAML GROUP BY statement and then get executed by REST Service API call.


I don't think Group By is supported in REST API. Below are alternatives to achieve this. You need to apply Group By once data is returned from REST service.

Assuming this is your getting list items via SharePoint REST API:

function getListItemsByQuery(url, listname, query, complete, failure) {
        url: url + "/_api/web/lists/getbytitle('" + listname + "')/items" + query,
        method: "GET",
        headers: { "Accept": "application/json; odata=verbose" },
        success: function (data) {
        error: function (data) {

Below function can be used to get unique values

function FilterValuetoGroupBy(items,propertyName)
    var result = [];
    $.each(items, function(index, item) {
       if ($.inArray(item[propertyName], result)==-1) {
    return result;

Use above functions like below

       var ItemsafterGroup = FilterValuetoGroupBy(items,'Title');
       console.log(ItemsafterGroup );

Try using this API :

/_api/Web/Lists/GetByTitle('List Name')/Items?$filter=Column_Name eq 'NameOfTheClient'

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.