Rest Sample URL Construction


  1. var url = "/_api/Web/lists/getByTitle('Favorite')/items?$select=ID,Title,Modified,Url,UserName/ID,UserName/Title&$expand=UserName&$filter=UserName/ID%20eq%20" + _spPageContextInfo.userId + "&$orderby=Modified%20desc";
  2.  var url = "/_api/Web/lists/getByTitle('DB')/items?$select=ID,Title,Project/ID,Project/Title,AuthorId,FileRef,ProjectId,Modified&$expand=Project&$orderby=Modified%20desc";
  3.   var  url = "/_api/Web/lists/getByTitle('UserProfile')/items?$select=FirstName,LastName,PicPath,UserLoginId&$filter=" + qryParam.substring(0, qryParam.length - 4) //UserLogin eq " + LatesTop[j].AuthorId;
  4. var  url = "/_api/Web/lists/getByTitle('DB')/items?$select=ID,Title,AuthorId,FileRef,Project/Title,AuthorId,ProjectId,Modified&$expand=Project&$filter=Author eq " + _spPageContextInfo.userId + "&$orderby=Modified desc";
  5. var  url = "/_api/Web/lists/getByTitle('Plant')/items?$select=Title,PlantType&$filter=Title%20eq%20%27" + plant + "%27";
  6.  var urlGetQstns = "/_api/Web/Lists/getByTitle('ActionsAndTools')/items?$select=ID,Title&$filter=PlantType%20eq%20%27Low%27";
  7. var  url = "/_api/Web/Lists/getByTitle('ActionAnswers')/items?$select=QZN/Title,QZN/ID,Plant/ID,Plant/Title&$expand=QZN,Plant&$filter=Plant/Title%20eq%20%27" + plant + "%27";
  8.  var url = "/_api/Web/Lists/getByTitle('Plant')/items?$select=ID,Title,Sector/ID,Sector/Title,Region/ID,Region/Title&$expand=Sector,Region&$filter=Title%20eq%20%27" + plant + "%27";
  9. var url = "/_api/Web/lists/getByTitle('SurveyScore')/items?$select=Plant/ID,Plant/Title,SurveyOption/ID,SurveyOption/Title,SurveyOption/OptionWeightage&$expand=SurveyOption,Plant&$top=10000";
  10.  var  url = "/_api/Web/lists/getByTitle('ContributionDetails')/items?$select=User/Title,User/ID,ContributionMasterItem/ID,ContributionMasterItem/Score&$expand=ContributionMasterItem,User&$filter=User/ID%20eq%20" + _spPageContextInfo.userId;
  11. var  url = "/_api/Web/Lists/getByTitle('Plant')/items?$select=ID,Title,Sector/ID,Sector/Title,Region/ID,Region/Title&$expand=Sector,Region&$filter=Sector/Title%20eq%20%27" + SectorNam + "%27";
  12.            
  13.                                                          

Comments

Popular posts from this blog

My Interview Experience

React Checkbox Control SPFx