SharePoint REST
3 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')/ItemsSolved24KViews0likes4CommentsIssues 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.3KViews1like0Comments