0

Required to get all column data with CAML query with GetItems REST API query since with the requirement of getting managed metadata term values. But its not returning all columns and values.

Query as below:

 var camlQuery = "<View><Query><Where><Eq><FieldRef Name=\"ID\"/><Value Type=\"Counter\">" + itemId + "</Value></Eq></Where></Query></View>"; 

 method: 'POST', 
                    url: siteUrl + "/_api/web/lists/getByTitle(\'" + listDisplayName + "\')/GetItems(query=@v1)?@v1={\'ViewXml\':\'" + camlQuery + "\'}", 
                    headers: { 
                        'Accept': 'application/json;odata=verbose', 
                        'Content-Type': 'application/json;odata=verbose', 
                        'X-RequestDigest': formDigestValue 
                    }
0

After few workarounds, found that issue was with the throttling. After increasing limits it will work fine, with no issues same as GetByTitle(‘ListName')/items SharePoint REST endpoint.

Steps => Central Admin> Application Management> Manage Web Applications> Resource Throtling General Settings> enter image description here

1
  • 2
    This is no solution, this is just postponing the problem for later, or killing your SQL server behind the sharepoint :) – michalh Aug 30 '18 at 8:26
0

You have to define all fields need to fetch in <ViewFields> tag.

  var camlQuery = "<View><Query><Where><Eq><FieldRef Name=\"ID\"/><Value Type=\"Counter\">" + itemId + "</Value></Eq></Where></Query><ViewFields><FieldRef Name='LinkTitleNoMenu'/><FieldRef Name='BatchSize'/></ViewFields></View>";
1
  • Requirement is to get all columns with data, So increasing throttling limit is the answer as I mentioned. – Kushan L Perera Sep 25 '16 at 2:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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