Stack Exchange Network

Stack Exchange network consists of 174 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

Questions tagged [rest]

The REST (Representational State Transfer) interface in provides access to lists and libraries as a relational data service. A core concept of any RESTful interface is the resource, and in SharePoint Foundation, lists and items are represented as HTTP resources that can be addressed by remote URLs.

1
vote
1answer
6 views

How to get a list's new Name after changing it with the REST API on SPO?

On SPO, after changing a list's Name in 'List Settings' > 'List name, description and navigation', the list's Name in the SPO webpages gets immediately updated, but the GET /_api/Web/Lists(guid'my-...
1
vote
1answer
16 views

SharePoint Online Rest: Lookup Values visible in list, ID column does not reveal the Ids of the item

I have an odd issue today. When looking at a list I can see the lookup field is populated with an item, this is one of a few lookup fields on the list. However when I look at the results of a rest ...
2
votes
1answer
30 views

SharePoint 2013 REST API filters

As part of our requirement, i created one BCS connection which retrieves data from a SQL stored procedure which acceppts two input paramaters. I was able to create a external list out of it. But when ...
0
votes
0answers
19 views

Update a list item in sharepoint online using FLOW

I would like to update a sharepoint list item using ms flow but need to use the "Send an HTTP request to sharpoint" option the update list action will not work due to some complex options in the form. ...
0
votes
0answers
28 views

Column Indexes not working as expected - SharePoint 2013

I've got a list with ~10k items in it; I've indexed this on a number of columns and have recently started to see 500 errors when querying the list via REST ($.ajax) despite the queries previously ...
3
votes
2answers
48 views

PnPJS - Check if site collection exists

With PnPJS, is there a way to check if a site collection exists given several URL? Something like this: import {Site} from '@pnp/sp'; const sitesToCheck = [ 'myspsite.net/sites/sc1' // exists '...
1
vote
1answer
28 views

Error reading syndication item: 'Data at the root level is invalid. Line 1, position 1.'

First time playing in this environment: Sharepoint 2010. I have access to very limited tools: browser, notepad and the Internets. Feeling a bit rusty, haven't programmed in a while and I'm having a ...
1
vote
1answer
48 views

I need to return the number of views a document was viewed?

I saw about the ViewsLifeTime and ViewsRecent properties. The two return empty. How do I work?
1
vote
1answer
30 views

Upload file to SharePoint online with HTTP REST calls

According to the following link: Working with folders and files with REST I can add a file using url: http://site url/_api/web/GetFolderByServerRelativeUrl('/Folder Name')/Files/add(url='a.txt',...
1
vote
1answer
22 views

Sharepoint 2013 rest api group subtask with respective main task?

Want to display Task and sub-task using the rest api jquery. My query string displays task and sub-task as individual unrelated task.
1
vote
1answer
32 views

AJAX REST call to POST to SharePoint list generates error

I am having difficulties with the JQuery implementation of AJAX to make REST calls to POST data to add items to my SharePoint list. Using 'GET' to retrieve information gives me no issues. Given the ...
1
vote
2answers
60 views

Using Javascript REST API to do asynchronous batch POST to multiple SharePoint lists

I'm in a bit of a quandry as I'm just learning how to do development in SharePoint 2016 / SharePoint Online and using Javascript to perform REST calls. I have a form that is using REST to successfully ...
1
vote
1answer
31 views

C# - How to add document with REST API in SharePoint 2016 On-Premise

I want to GET documents With SSOM in SP2007 and upload with REST to SP2016 This SSOM code for create doc library: (Working): private void CreateList() { var digest = GetFormDigest(); var ...
2
votes
1answer
22 views

Extract sub site logo with MS Graph (or any other way)

I need to extract sub sites logo and show it in a list. This is something I thought could be made with MS Graph, but in MS explorer I can't find the picture element. Only site ID, members, etc. ...
1
vote
1answer
38 views

Is there a way to get CSOM ClientContext by having cookies and a Form Digest?

I have been trying to do an interesting proof-of-concept/experiment Get SharePoint user's cookies from the browser Pass these cookies to an Azure Function By having cookies only - determine who the ...
0
votes
0answers
26 views

REST call for fields: “Type cannot be null”

I'm making rest calls to get a lists fields in a custom JS application. For some reason it's failing when I make the call through the app but when I do it in the console it works fine. I'm using ...
0
votes
1answer
8 views

Provide user a filtered set of managed metadata column values for filtering on a list view

Background/Problem Our customer recently switched from a choice column to using a managed metadata field to capture data in a list. They really love the ability to add new values on the fly, as well ...
0
votes
0answers
13 views

How to create Web API controller in SharePoint 2010 Farm solution

I am trying to build the services in SharePoint 2010 farm solution which would connect to SQL database and return the response in JSON. I tried exploring and all I could find was that I can build Web ...
1
vote
0answers
11 views

I want authors to be able to edit some items on the site using REST api

I am new at using REST api and fairly new to sharepoint. I got assigned a project to design a home page, which I already did and my boss wants the authors to be able to edit some of the fields on the ...
1
vote
1answer
25 views

How can I get current user roles for specific document in a document library?

I can add a role to a document with this code: var REST = globalvars.absoluteUrl + "/_api/SP.Sharing.DocumentSharingManager.UpdateDocumentSharingInfo"; var data = JSON.stringify({ '...
0
votes
1answer
38 views

REST API couldn't create list field

I am trying to create list fields using REST api. But when I call the code given below many times, it creates some of the fields and not all of them. code: function addnewfield(name){ $.ajax({ ...
0
votes
1answer
14 views

How can I get specific roles for each user in “SharedWithUsers” field?

I'm doing a REST to get "SharedWithUsers" field. My query is expanding ID and Title of "SharedWithUsers" field: var REST = globalvars.absoluteUrl + "/_api/web/lists(guid '" + globalvars.libraryGUID ...
0
votes
1answer
24 views

Create tasks programmatically in Project Server

I need to copy tasks from one project to another in MS Project 2016 using JSOM or REST API. I used code like this: function AddTaskToProjectREST(TaskToAdd) { $.ajax({ url: "/pwa/_api/...
0
votes
0answers
26 views

Sharepoint Online REST API from external web application: 403 Unauthorized

Following this tutorial, I have done the following: I have a subsite setup on my organization's sharepoint farm. I have created a client_id and client_secret and granted the client_id permissions of ...
0
votes
0answers
17 views

Use REST to extract specific HTML content from another page in SharePoint Online

I have a web part that uses search and display everything in two separate columns, for example like this: <h2>All projects</h2> <tr> .... </tr> <h2>My projects&...
1
vote
1answer
52 views

How to create folder with custom Content Type in REST with SPFx?

I am creating an SPFx solution to create folders with nested folders. This solution is working fine. but I want to attach some metadata to my folder. For this reason I have created a new folder ...
0
votes
1answer
17 views

Getting Array Values [duplicate]

I have a small problem that i am facing while i fetch a column that is should Cost Modeler(People Picker field) from other list. As, i fetch the values using top, i return 1329 items and then i ...
0
votes
1answer
42 views

Sharepoint O365 pnp js get all users

I know this has been asked several times but I haven't found a viable solution. I am building a spfx webpart where I want to display every single user with name, title, email etc. I am using the pnp-...
0
votes
0answers
19 views

Sharepoint 2013 REST API Query not returning Video Files

I am attempting to pull back video files from a SharePoint 2013 on-premise library using the following simple REST query: https://sa2.testServer.com/sites/srcrep/_api/search/query?querytext='...
1
vote
1answer
38 views

Send exported Word Document from another application to SharePoint Library (SP2013 on-premise)

First of all, there are similar questions on this forum, but I don't really know if and how I can adopt them to my Use-Case, which is based on a workflow script. I am working on a script, which ...
0
votes
0answers
37 views

The given key was not present in the dictionary

I took a list from 1 site collection, templated it with data. Downloaded the template and uploaded it into another collection. I created a list using this template and it looks like it's working and ...
0
votes
1answer
45 views

How to retrieve data using REST from another Custom List View in SharePoint and return it to Datatable?

function loadDataTable(agentInfo) { $.ajax({ url: vUrl + "/_api/Web/Lists/GetByTitle('TrainingTrackers')/Items?$filter=AVP eq '" + agentInfo + "' or MANAGER eq '" + agentInfo + "'", ...
0
votes
0answers
20 views

GET listitems paged and desc ordered

I have a working REST request which returns items ordered desc by a date (newest first). Now I want to paging the results by using $skiptoken. But because skiptoken works with the last received item ...
0
votes
1answer
26 views

Get List items by specific content type from site and subsites

I'm trying to extract list data from a site (with REST query) and its subsites based on their content type and put everything in a different list. For example from https://mytenant.sharepoint.com/...
0
votes
1answer
51 views

Get all lists on subsites by content type with REST API

I want to get all lists from subsites etc. based on their content type with REST Api. For particular list ("ProjectList") this works: /_api/Web/lists/GetByTitle('ProjectList')/Items? $select=...
0
votes
0answers
23 views

“Undefined” results with REST Query

I have a web part that extracts list items from another list and outputs them in a HTML table. However, the list items that gets output have "undefined" values. I know somewhat why - the call is ...
0
votes
0answers
21 views

Subsite Current User Permissions

How do I display subsites only if the user has access to that subsite? I tried GetSubwebsFilteredForCurrentUser but it isn't working when I tested it on other users. It seems to display all of the ...
0
votes
0answers
9 views

New page with default content page has no page layout

I've created a form to make a new page with a few tags to work with a page layout / pages library I've set up earlier. The form asks for a page title and a 'Resource' tag and generates the url. As far ...
1
vote
1answer
18 views

how to achieve SharePoint search REST API in Salesforce

Salesforce team want to query the documents, stored in SharePoint sites . We believe, need to expose the sharepoint search service to REST API so that the query results can be viewed directly in ...
1
vote
0answers
16 views

What permission level do you need to get data from Project Server REST APIs?

I'm working on a web part that sits on a SharePoint site in a Project Web App instance, and reads project data using the Project Server REST APIs. We recently got a few schedulers involved to be beta ...
0
votes
1answer
24 views

403 on /_api/web/webs if I don't have access to 1 subsite out of many

I have a REST call to mysite/_api/web/webs, I get a successful response, but if i remove permission from mysite/subsite01/ I get a 403, even if I have access to mysite/subsite02/ mysite/subsite03/. I ...
0
votes
1answer
49 views

How implement REST queries in SharePoint?

I'm a dev who tries to learn SharePoint but find it quite hard to navigate around. I want to create a list that gets list item from an external list by their content type. I have made a REST query ...
0
votes
0answers
17 views

Retrieve list items by content type with sp.search

I have a list that I want to populate with items from another list by their content type. For a REST call it would be: /_api/web/lists/getbytitle('MyList')/items?$select=ContentType/Name&$expand=...
0
votes
0answers
25 views

getFormDigest Rest API

I am using A SharePoint Rest API to write to a list on my sharepoint site. I need to get the FormDigestValue from the REST endpoint _api/contextinfo. I see a lot of examples on how to obtain the ...
0
votes
0answers
26 views

Get all users that have particular level of permission on list item

All list items have unique permissions and I want to get all users that have exp. View permission on certain item. Exp. on list item there are 3 users with full permissions, 10 with Contribute, 1 ...
0
votes
0answers
20 views

Return previous records in REST API (opposite of data.d.__next)?

I'm working on a REST API paging and can't seem to figure out how to return the previous record. For instance I'm using $top=100 which displays 100 records at time, then using data.d.__next to jump to ...
0
votes
1answer
24 views

create link to open files (xlsx, pdf, docx) in browser in Office 365

I have created a custom page It makes an ajax call and then results are shown in the page $.ajax({ url: _spPageContextInfo.webAbsoluteUrl+"/_api/web/lists/getbytitle('Document Library Name')...
2
votes
3answers
189 views

Exclude folder from results in SharePoint REST API

I am using a REST API to get the list of all files inside a document library. However, this also brings the list of all folders. Is there a way to filter out the folders and bring only the files ...
0
votes
2answers
84 views

Response status of rest api in sharepoint 2013 workflow for breakroleinheritance is forbidden

I am using http web service to break permission inheritance for current item.for that I am using the following sequence. 1) fetching Request Digest value using following rest api endpoint: ...
0
votes
0answers
33 views

Add users to Group with REST calls

We are using REST (with jQuery ajax) to create groups and add members to the groups. We are using the code below (cleaned up a little for legibility). function createGroup(title,user){ var ...