Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
The results are in! See what nearly 90,000 developers picked as their most loved, dreaded, and desired coding languages and more in the 2019 Developer Survey.

New answers tagged

2

REST data can be consumed by just about everything: JavaScript, C#, PowerShell, and of course Power BI. Launch Power BI Desktop Click Get Data from the ribbon Click OData Feed. Enter a URL to a SharePoint web service. This one retrieves all Touring bikes. This example assumes a list named “Bikes for Power BI” Example: https://yourDomain.sharepoint.com/...


2

Answer that was provided by Gautam Sheth is great! As alternative you can use endpoint - /_api/web/lists/getbytitle If you know ID of listitem\document try: https://tenant.sharepoint.com/sites/sitecollection/_api/web/lists/getbytitle('Documents')/items(1)?$select=Title,InternalName,Editor/Title&$expand=Editor/Id Where 1 is document Id.


3

You need to adjust the endpoint a bit. Need to specify ListItemAllFields,ModifiedBy as expand param and also specify Title,ModifiedBy,ListItemAllFields/InternalName as select values. Replace the internal name with the actual name of the column in your SP Doc lib. Modify the endpoint as below: /_api/web/GetFileByServerRelativeUrl('/sites/sitecollection/...


0

Old thread but just want to share what fixed my issue. Make sure the user performing the REST call have below the permission "User Remote Interfaces". To check the permission level, refer to below steps: Site settings (root site) > Site Permissions > Permission Levels > Edit Permission Level > Under Site Permissions Use Remote Interfaces - Use SOAP, Web ...


0

You say that the Minimal Download Strategy feature is enabled on the site, and I'm guessing that's where the problem is coming from. With MDS enabled, the MDS engine tracks which resources have already been loaded by the browser, like Javascript and CSS files. If something is determined to have been loaded already, MDS will prevent it from being reloaded ...


0

How are you getting the code to kick off? $(document).ready(function(){<code here>});? It's possible that the token needed for a rest call hasn't been generated yet when the code runs, causing it to not kick off properly. Are you receiving any errors in the error callback?


0

Unless you use a $select in your query, you should be seeing all the columns from your list returned in your result data. Just as you are accessing the Id and Title properties of the list items, you can access the Created and Modifed properties as well. Keep in mind that date fields come back as ISO formatted strings (i.e. 2019-04-10T22:41:55Z), so in ...


0

Run the following code into your browser's console: var url = _spPageContextInfo.webAbsoluteUrl + "/_api/web/lists/getbytitle('Demo List')/items"; $.ajax({ url: url, method: "GET", headers: { "Accept": "application/json; odata=verbose" }, success: function (data) { var items = data.d.results; // Loop thru items in array ...


0

In the Azure App you have created, you need to select API as - Office 365 SharePoint Online. In the Delegated Permissions section select "Read and Write User Files". Hope this helps..


0

Modify the code as below. <script src="https://code.jquery.com/jquery-1.12.4.min.js" type="text/javascript"></script> <script type="text/javascript"> $(document).ready(function(){ $.ajax({ url: _spPageContextInfo.webAbsoluteUrl+"/_api/Web/GetFolderByServerRelativePath(decodedurl='/sites/test/Negocio/Precario/Precario%...


1

Requesting the Items collection for the library will bring back all items and folders regardless of what folder they are in. You can use the FileSystemObjectType or ContentType property to determine if the item is or is not a folder. In the example below I'm using the FileSystemObjectType. function getItemsOrFolders(fileSystemObjectType) { var message = ...


0

I resolved this simply by X-Requested-With: XMLHttpRequest to my header. Unfortunately it does not appear in microsoft's documentation here https://docs.microsoft.com/en-us/sharepoint/dev/sp-add-ins/working-with-lists-and-list-items-with-rest and it cost me a lot of time. I found it by tracing my older projects that used AJAX to communicate with SharePoint ...


0

I write this package to connect to both SharePoint Online and SharePoint Server: https://github.com/LukasK13/sharepointr


0

See in image and also referenced link Reference:https://support.office.com/en-us/article/Invalid-file-names-and-file-types-in-OneDrive-OneDrive-for-Business-and-SharePoint-64883a5d-228e-48f5-b3d2-eb39e07630fa


0

If you were using 0365 / SP Online then this is a known issue. Structural navigation can result in major performance issues. This is why even Microsoft recommends to use mananged navigation instead of structural.


5

Sorry, but there is no way to run at elevated privileges from the client-side, and if there was a way, it would be roughly 0% secure. Depending on what you're trying to achieve, there are some ways that you might be able to work around it. For instance, if you can do it from a workflow, SharePoint 2010 workflows can do an impersonation step which runs as ...


0

open an elevated command prompt: a) Go to start and type in cmd in the search box. b) Right click on the command prompt and click run as administrator. Now reset your TCP/IP stack: a) Type the following commands (see below) in the command prompt, each followed by pressing enter. b) Restart the computer. Now open Internet Explorer and check if you can ...


0

//you can re-iterate inside the success to call the Attachments api //for every item inside the data result of the first out ajax call $.ajax({ url: Siteurl + "/_api/web/lists/getbytitle('" + listname + "')/items" + query, method: "GET", headers: { "Accept": "application/json; odata=verbose" }, success: function (data) { ...


0

If you want to get the attachments for a specific item from the custom list, you need to have the internal ID of the record item. Once you have your ID, you can do a rest call, here the rest URL: /_api/lists/getByTitle('{{ListName}}')/items({{ID}})/AttachmentFiles You just need to pass the List name and the item ID. BR, jasminb


3

While Joe McShea is correct in that there is no direct "distinct" type of operation through the REST API, as I learned in the answer I accepted to a question I had over on S.O., you can get distinct values through some clever querying. Now, I'm not sure you can do this directly using oData query options (although you might be able to), you could certainly ...


2

No, SharePoint REST/OData has no equivalent select distinct. You can only achieve this by post-processing. Ref: How to get distinct values using Rest Api and bind to html dropdown


-1

/_api/search/query?querytext='Path:https://sharepoint.com/sites/test/Lists/COMPActivity'&sourceid='d46e3'&selectproperties='ListItemID,Title,Path,ViewsRecent'&processbestbets='true'&enablequeryrules='true'&rowlimit='200'&trimduplicates='false'&sortlist='ViewsRecent:descending'&startrow=0


1

With SharePoint 2013 SP1, you should see the version 5.6 of the following assemblies in the GAC ( C:\Windows\Microsoft.NET\assembly\GAC_MSIL ): Microsoft.Data.Edm Microsoft.Data.Odata Microsoft.Data.Services.Client Microsoft.Data.Services System.Spatial You will probably find version 5.0 and version 5.6. Right click on the assembly, properties, details tab....


3

You will not be able to get the URL of lookup documents directly using only one REST Call. You need to make the Nested REST calls in order to get the URL of lookup documents. First, you need to get the ID of document from lookup as given below: https://MySharePointSite.sharepoint.com/sites/TransformationOffice/_api/web/lists/GetByTitle('ProjectModel')/...


0

For reference I think the correct solution is to give the workflow app the necessary permissions In summary In Manage Site Feature, activate feature "workflow can use app step". Now go to Site settings -> Site App Permissions , there you will find an entry for Workflow i.t|clientID@tenantID. Copy the Client ID and give it full control over site/list etc. ...


Top 50 recent answers are included