SharePoint REST
5 TopicsHow to get all pages under "sitePages" using SharePoint REST API in modern sites ?
I have created number of pages under "/SitePages" and want to retrieve them using SharePoint REST API. The below one's doesn't work _api/web/lists/getbytitle('SitePages')/Items _api/web/lists/getbytitle('Pages')/ItemsSolved25KViews0likes4CommentsIssues getting SharePoint List Image to my Mobile Image Preview
I am facing issues getting the SharePoint list image to my Mobile App on Image Preview. When I pass the Image URL as in the code below, I am getting a 401 error. I would appreciate, if anybody could suggest a solution for this issue. Image Url = "Tenant name/NewsImagesHF/allergens-banner_0.jpg"; async getImageUrl(url: any) { let options = this._apiHeader(); this._apiGetData(url, options); } async _apiGetData(apiURI: any, options: any) { return new Promise((resolve, reject) => { this._http.get(apiURI, options) .subscribe(res => { resolve(res.json()); console.log(res.json()); console.log(res); }, (err) => { reject(err); }); }); } _apiHeader() { let headers = new Headers(); headers.append('Authorization', 'Bearer ' + localStorage.getItem("token")); headers.append('Content-Type', 'application/json'); let options = new RequestOptions({ headers: headers }); return options; }1.3KViews1like0CommentsResetting the file handler cache Failed
I used postmen and send the following request for resetting file handler cache. GET https://xxx-my.sharepoint.com/_api/v2.0/drive/apps?forceRefresh=1 Authorization: Bearer {access-token} but i get the following error in postmen when executing above request {"error_description":"Exception of type 'Microsoft.IdentityModel.Tokens.AudienceUriValidationFailedException' was thrown."} Any idea please Thanks1.1KViews1like0CommentsSharepoint Cross Domain AJAX
I need to execute CrossDomain REST Request (AJAX) on Sharepoint REST API, and get content as result of this request. My script executed on Browser (Chrome) on wich I logged on Sharepoint. CODE EXAMPLE // Load the required SharePoint libraries $(document).ready(function () { $.ajax({ method: "GET", headers: { "Accept": "application/json; odata=verbose" }, cache: false, async:false, url: "https://LINK_TO_SITE.sharepoint.com/_api/lists/getbytitle('Kunde')/items?$expand=Folder", data: "", contentType: "application/jsonp; charset=utf-8", dataType: "jsonp", processData: true, crossDomain: true, success: function (data, status, jqXHR) { console.log(data); }, error:function (data, status, jqXHR) { console.log(data); } }); }); And Have this error If change dataType: "jsonp" to dataType: "json", get next error This Page I publishing on the Dynamics CRM site as WebResource Maybe some of you have a decision?1.4KViews0likes0Comments