Créer un site internet

Sharepoint Rest Query List

fredericdietrich By On 21/09/2019

Query sharepoint list with REST

 

use this end point to query your list http://test/sites/test/_api/Web/Lists/getbytitle('vvv')/items?$select=&$filter= Title eq 'entite du ga 1'

Example : http://test01/sites/test01/_api/Web/Lists/getbytitle('Aliste')/items?$select=Title,ID,Author/Title&$expand=Author&$filter= Title eq 'entite du toto 1'

to order by : &$orderby= Employee asc

to order by : &$orderby= Employee desc

to limit number of items returned : $top 5

to use paging : $skip 5

new paging mode add in your first query  &$skiptoken=Paged=TRUE in your response, you will receive next page query in odata.nextLink as below

Nextlink

/_api/Web/Lists/getbytitle(%27Initiatives%27)/items?%24skiptoken=Paged%3dTRUE%26p_ID%3d266&%24select=Title%2cID&%24orderby=ID+desc&p_ID=268&%24Top=3

 

expand lookup fields : $expand=city&$select=city/Id

 

viewfields : $select= Title, ID

filter : $filter=Title eq 'mon noeud' and ID ne 1

 

Numeric comparisons

  • Lt
  • Le
  • Gt
  • Ge
  • Eq
  • Ne
 

String comparisons

  • startsWith
  • substringof
  • Eq
  • Ne
 

Date and time functions

  • day()
  • month()
  • year()
  • hour()
  • minute()
  • second()

 

 

Querylist 1

 
 

html to query list

 

javascript to query list

 

css to query list

 

base html file

 

Full script to add in an Script Editor webpart

 

script without JQuery

 

REST Sharepoint

  • No ratings yet - be the first to rate this.