REST
7 TopicsAuditing external REST access to SharePoint Online folder
Hi I've set up SharePoint Online so that an external app can scrape content from a document library using XML rather than JSON. Question I've got is there anyway I can monitor when they make Get requests to the folder so I can audit times / dates when they scrape the content from the document library out of the box using logs for example? Thanks Chris706Views0likes0CommentsDeleting an existing file with same name and updating the new file using rest
Hi all, I am following this tutorial:https://docs.microsoft.com/en-us/sharepoint/dev/sp-add-ins/upload-a-file-by-using-the-rest-api-and-jqueryfor uploading file from my page to sharepoint using rest. I need to reupload the file into this library with the same name but it should replace the previous version of the file with the new version, How can I change the implementation and achieve that. Please help.1.5KViews0likes0CommentsUnable to update InformationRightsManagement using REST (sharepoint-online)
The following request returns status 204, indicating it was a success but the informationrights settings hasn't become updated when I take a look the IRM-settings in the web gui for the list. The property `IrmEnabled` seems to have been updated on the list but not the informationRightsManagementSettings!? var resp = await MakeJsonRequestAsync(new { __metadata = new Metadata() { type = "SP.List" }, IrmEnabled = true, IrmReject = true, IrmExpire = true, InformationRightsManagementSettings = new { __metadata = new Metadata() { type = "SP.InformationRightsManagementSettings" }, AllowPrint = true, AllowScript = false, AllowWriteCopy = false, DisableDocumentBrowserView = false, DocumentAccessExpireDays = 90, DocumentLibraryProtectionExpireDate = DateTime.Now.AddMonths(6), EnableDocumentAccessExpire = false, EnableDocumentBrowserPublishingView = false, EnableGroupProtection = false, EnableLicenseCacheExpire = false, GroupName = "", LicenseCacheExpireDays = 31, PolicyDescription = "testpolicy", PolicyTitle = "Victors Test Policy" } }, "/_api/web/lists(guid'" + listId.ToString() + "')/", newSiteUrl, accessToken, HttpMethod.Post, new Dictionary<string, string>() { {"X-Http-Method", "MERGE"}, { "If-Match", "*" } }); I have also tried to make a POST directly to `/_api/web/lists(guid'" + listId + "')/informationRightsManagementSettings` but it ends up in status 400 no matter what I do. Any help is greatly appreciated!Solved1.8KViews0likes4Comments_spPageContextInfo is undefined
I have a very simple REST call to get all of the items in a list(Announcements) but when I run this Mikael's script editor web part I get this error_spPageContextInfo' is not defined. where _spPageContextInfo is the current url of the page I am in). What am I doing wrong (I am using modern pages) ? $.ajax({ url: _spPageContextInfo.webAbsoluteUrl + "/_api/web/lists/getbytitle('Announcements')/items", method: "GET", headers: { "Accept": "application/json; odata=verbose" }, success: function(data) { console.log(data.d.results); }, error: function(data) { alert(JSON.stringify(error)); } });Solved22KViews0likes3CommentsSite themes via Rest.
I tried following athttps://docs.microsoft.com/en-us/sharepoint/dev/declarative-customization/site-theming/sharepoint-site-theming-rest-api I keep getting the following response: <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Error</title> </head> <body> <pre>Cannot POST /_api/thememanager/AddTenantTheme</pre> </body> </html>1.8KViews0likes3CommentsIs there some REST Query builder tool?
We are using SharePoint 2016. I am using sometimes REST urls in javascript logic. For example: Get all list items from document library "Documents" where column "Modified" is equalas current date AND column "Created" is less than as current date. Is there some tool where I can connect to my sitecollection, see all my lists, and can configure in the GUI a query by list columnswhich shows me the REST url?977Views0likes0Comments