If you set ‘Content Approval’ for the list, this OOTB field will be added into list.

Internal name : _ModerationStatus

Display name : Approval Status

fieldtype : ModStat

 

1. Caml Query :

<Where><Eq><FieldRef Name=’_ModerationStatus’ /><Value Type=’ModStat’>Approved</Value></Eq></Where>

oListItem.get_item(‘_ModerationComments’);

oListItem.get_item(‘_ModerationStatus’);

 

2. Rest Query

/_api/Web/lists/getbytitle(‘LIST_DISPLAYNAME’)/Items&$filter=_ModerationStatus eq 0

 

data.d.results[i].OData_ModerationComments

data.d.results[i].OData_ModerationStatus

 

 

public enum SPModerationStatusType
{
Approved, //0
Denied, //1
Pending, //2
Draft, //3
Scheduled //4
}

SPModerationStatusType.Approved

 

SharePoint rest query item retrieve default count is 100.

https://$DOMAIN/$SITE/_api/web/Lists/getByTitle(‘$LIST&#8217;)/Items

 

You can add top parameter to get more items but you have to be careful because this can make some performance impact.

https://$DOMAIN/$SITE/_api/web/Lists/getByTitle(‘$LIST&#8217;)/Items?$top=1000

However there is a 5000 threshold for the query.

 

Or you can utilize next query url.

success: function (data) {

if (data.d.__next) {
url = data.d.__next;
GetItems();
}

}

Reference : http://sharepoint.stackexchange.com/questions/74777/list-api-get-all-items-limited-to-100-rows

 

 

I got alert message when I click ‘Open with explorer’  such as

We’re having a problem opening this location in File Explorer, Add this web site to your Trusted sites list and try again

Check list

  1. Add the site as Trusted sites from internet options/Security
  2. Desktop experience feature install from Service Manager
  3. Run web client service from services (if it’s already started, stop and re-start)

Reference )

We’re having a problem opening this location in File Explorer, Add this web site to your Trusted sites list and try again

Only basic OData query operators supported in the SharePoint Rest service

https://msdn.microsoft.com/en-us/library/office/fp142385.aspx#bk_supported

String Comparisions (startWith, substringof, Eq, Ne)

 

Full OData Query option from odata.org

http://www.odata.org/documentation/odata-version-2-0/uri-conventions/#FilterSystemQueryOption

 

SharePoint REST API Supporting keywords – OData query URL

SharePoint REST API Supporting keywords – OData query URL

http://www.andrewconnell.com/blog/Applying-Filters-to-Lookup-Fields-with-the-SP2013-REST-API

 

-When you filter user object field you can filter without id postfix.

when you select the user field(Created by)

you can use $select=AuthorId

but you can’t use $filter=AuthorId eq 10

instead of you can use $filter=Author eq 10 without Id postfix.

or you can use $expand option

However there is no way to check user field is null or empty with OData query

Query for multi-value lookup fields and users

: Because multi-value lookup fields are returned as a string of multiple values, there is no way to query for them (for example, the equivalent of an Includes element or NotIncludes element is not supported).

So we have to use Rest Caml query

https://<site>/_api/web/Lists/GetByTitle(‘%5Blist name]’)/GetItems(query=@v1)?@v1={“ViewXml”:”<View><Query>[other CAML query elements]</Query></View>”}