Questions tagged [sharepoint-rest-api]
Using the Representational State Transfer (REST) interface provided by SharePoint
1,601
questions
0
votes
0
answers
19
views
REST API show items if current logged in user's department is not equal to other user's department
How can write logic in REST API if current user login is from department XX-YYZ-AB or ZZ-YYZ and I have another list with list of people with different departments, so how shall I exclude users in my ...
1
vote
1
answer
11
views
SP Online rest api: How to get all properties/columns from folders within another folder in a single request?
I have the "Goods" folder which I can access with the following endpoint:
https://***.sharepoint.com/sites/***/_api/web/GetFolderByServerRelativeUrl('/sites/***/Goods/')
If I expand the ...
0
votes
0
answers
9
views
Sharepoint API is not returning "next" page in Programmatic access through Python
Having two Lists, Registrations (around 300 items) and Tracker (around 6500 items).
There is script which successfully parses Tracker for a while now, with the following call:
_api/web/Lists/...
0
votes
0
answers
13
views
listdata.svc not working in SharePoint online Site collection
I am using Power Automate to make a http call to SharePoint site but it is giving 409 error with no additional details.
When I tried to manually visit the listdata.svc URL, it only gives an error as ...
0
votes
1
answer
21
views
How to retrieve csv/json file from SharePoint document directory with RESTful call
I tried to create a RESTful call that can be invoked by Angular/JavaScript command to load all data from a csv file or json file and dump them in javascript arrays
I tried
https://my.sharepoint.com/...
0
votes
0
answers
21
views
Calling SharePoint on premise rest api from online
How to call sharepoint onpremise rest api from sharepoint online ?
So i want to call user profile data of current user from sharepoint on premise but want to display data in SharePoint online both ...
0
votes
1
answer
41
views
Sharepoint REST 429 error. Multiple users read the same config file
I am working on a JAVA onPrem app. For this app I have a config file which must be accessible by all the users that are using the app on startup. To achieve this I've tried using sharepoint. I've ...
1
vote
1
answer
38
views
SharePoint Search REST API does not return custom columns values
I've been trying to use SharePoint REST API to retrieve a number of files on my site but for some reason, if it does tell me the name or descriptions of the files, it returns null for every single ...
0
votes
0
answers
12
views
Calculated Column Returns Different Results for Different Users
I have created calculated columns to represent the days Monday-Friday:
Monday (Date & Time Column with Calculated Value): =(2-WEEKDAY(Today)+(Today))
Tuesday (Calculated Column): =Monday+1
...
0
votes
1
answer
36
views
How can I download shared files by REST API?
Is it possible to download files from shared folders/URLs using REST API?
I need an app which can download content from chats/channels of MS Teams.
1
vote
0
answers
32
views
Sharepoint REST API columns(fields) and content types modification
Does SharePoint REST API have some sort of modification time, flag, change token or ID for columns or content types modification?
For example, for a list item i can get last modified time from "...
0
votes
1
answer
19
views
Rest API counts attachments for a list item but "delete" only deletes the first attachment
I have this rest api that looks for all of the attachments for a specific item. If it finds three attachments, for some reason the DELETE method only deletes the first one that it finds. Not sure ...
0
votes
0
answers
16
views
Access Sharepoint Search API from React Application
I am trying to access the Sharepoint search API from my react application (Outside Sharepoint). Please suggest me a way to achieve this.
https://[tenant]/sites/[sitecollection]/_api/search/query?...
0
votes
1
answer
67
views
Conditional URL with ternary operator in a href tag in JavaScript
Can anyone help me in writing ternary operator in JavaScript in below line if href is empty set data.d.results[i].EncodedAbsUrl else data.d.results[i].ServerRedirectedEmbedUrl
listItemInfo += "&...
0
votes
1
answer
48
views
Get Image URL in SharePoint document library
I have the below code which allows me to get all type of document URL for SharePoint which can be opened from link but there are images when trying to open it load the same page
here is a format for ...
0
votes
2
answers
33
views
How to format results from rest api sharepoint jquery
I am using rest api to get results in below format but how shall append my result to get in desired format and on click document should open new tab
my code
function getListData() {
var ...
0
votes
0
answers
17
views
Set Lookup Field while creating Document Set REST API
I am creating document sets like described here: Is it possible to create a Document Set using REST API
(How) can I add metadata values (including lookup column value) to the payload? Or do I have to ...
0
votes
0
answers
28
views
How to read and show documents with folder name using rest api in sharepoint
I am creating a ui where user will toggle through document library from left navigation using below article as my reference
https://stackoverflow.com/questions/65108878/dynamically-fetch-sharepoint-...
0
votes
0
answers
15
views
Entries doesn't appear in SharePoint after REST Python query. (Ghost entries??)
I'm trying to append multiple entries to a SharePoint List using REST in Python, apparently it works when I get the list from Python but when I look in SharePoint the data doesn't exist in anyplace.
1
vote
1
answer
372
views
Rest API Add item to sharepoint list - Cannot convert a primitive value to the expected type 'Edm.String'. See the inner exception for more details
I have this Rest API to add an item to a SharePoint list in SP 2016 on premise.
I am passing information to it from global variables that get set in other APIs. The error I'm getting is:
{"...
0
votes
0
answers
40
views
Authenticate external user on SPO site to access REST API
I'm currently developing a new product for the company I work for and so far I'm using an App Registration with application permissions with SharePoint REST API access, and this works great but ...
0
votes
1
answer
16
views
Getting the ID of a lookup column?
I have a list which has a lookup column in it. "Subcats" has a lookup to "Cats". If I do an ajax call like this
url: _spPageContextInfo.webAbsoluteUrl+"/_api/web/lists/...
1
vote
1
answer
96
views
SharePoint List Filter Query By UTC Date Not Valid
I am having an error with my filter with other people located in separate time zones. It was recommended to me to switch to filtering with a UTC date instead of an ISO date and that should fix the ...
0
votes
1
answer
16
views
Unable to get property 'LTIOV' of undefined or null reference
I am using this code to retrieve data from my sharepoint list. Regardless of my Null check I still get the error saying unable to get property or null reference.
$.ajax({
url: ...
0
votes
1
answer
22
views
Does this sudden 500 mean my script is being throttled?
I have a script whose job it is to POST about 20,000 pdfs (average size 200k) to a SharePoint list, while populating a couple of text and date columns. The script runs on a schedule, every 5 minutes. ...
1
vote
1
answer
26
views
Why filtering by date still exceeds the list view threshold?
I try to prepare a view for a list containing more than 5k items. When I try to filter it by an equal value in one column via REST API /Items?$filter=Status eq 'Not completed' , it does show a list ...
0
votes
1
answer
52
views
How to restore a version of a list's item?
I want to restore a version of an item by REST API. I've tried restoring the version in the browser by opening the view below and it did work. The ID of the version which I wanted to restore is "...
0
votes
0
answers
15
views
(REST) Is there a way to delete all attachments of a list item, without knowing their names or iterating them?
When I try to DELETE a list item having an attachment, I get a 412 (Precondition failed). When I do a DELETE against an item having no attachments, it works. It looks like deleting the attachments is ...
0
votes
1
answer
63
views
SharePoint Online REST API access using AAD Client ID and Client Secret
We are trying to generate token to access SharePoint Online REST API using an app secured by AAD client ID and Client Secret. But getting unauthorized.
I see many articles saying either we have to use ...
0
votes
1
answer
31
views
Display check box for each row in html table [closed]
I am creating the HTML table using the rest api SharePoint. I want to add a check box for each row and on the selection of check box want to do the CURD operations. What to do?
0
votes
0
answers
62
views
Can get data from REST API with Postman, but not JavaScript Fetch request (localhost)
So I follow the tutorial in this link. Including the tutorial before it to set up an add-in. So my issue is that I am successful in getting the access token(Bearer Token) using Postman and then using ...
0
votes
1
answer
44
views
How to send a CAML Query with curl?
I've been using a CAML Query for getting all files in a document library in SharePoint 2013.
I used PnP with PowerShell for this purpose, but as I would like to get all files on Linux. I think it's ...
0
votes
1
answer
77
views
Uploading files to sharepoint with RestSharp and their rest API is adding header and trailer lines to every file
I'm uploading to sharepoint using a c# client, and every file I Upload gets extra data included. A one line CSV file gets turned into a 7 line file that isn't usable. This is what my one line file ...
1
vote
1
answer
87
views
Uploading files from node/Express.js server to sharepoint
I'm trying to send a file to a SharePoint folder using the sp-request module.
I can upload a .txt file and it opens correctly.
But when uploading .docx files, the file becomes corrupted.
My collection ...
0
votes
1
answer
61
views
SharePoint REST API read large list items with pagination
We have a SharePoint 2016 list with 15,000 records and we need to get all the items using REST API. We can use top to read only top 5000 records.
If I need to read data in sets of 5000 items and then ...
1
vote
1
answer
13
views
Access files via autogenerated ID through REST API
what I'm currently doing is accessing the files in my Document Library through the REST API like this:
[baseURL]/_api/Web/GetFileByServerRelativeUrl('[relativeURL]'). To collect these relativeURLs, I ...
0
votes
1
answer
19
views
Sharepoint 2016 REST API - get list ID & file ID from direct file link
I have the full SharePoint URL for a file, like: https://my-sharepoint-host.net/subsite/library/LOOONG folder name that exceeds the configured maxUrlLength value/fileName.txt
I need to obtain some ...
1
vote
2
answers
97
views
How to use expand in rest api to get child list records
We have 2 lists. List A is the parent and List B is the child.
I want child record details when I am querying to the parent list.
Current API:
https://url/_api/web/lists/GetByTitle('ListA')/items?$...
0
votes
2
answers
13
views
How to determine if a RoleDefinition grants read access or not?
I have the role definitions like this:
https://YOUR_TENANT.sharepoint.com/sites/YOUR_SITE/_api/web/roledefinitions
So this will return something like:
{_ObjectType_=SP.RoleDefinition, _ObjectIdentity_=...
0
votes
0
answers
10
views
How to Upload to SharePoint using my android studio app with java
I have found several snippets of this but none contributes my need.
how can I upload an image to my company SharePoint using Android Studio with java.( not with Maven )
0
votes
3
answers
52
views
how to check if user exist in two groups rest api
I am using below rest api call to check if user exist in Admin group but how to check if user exist in more then one group ex Admin and Member group
url: absoluteUri + "/_api/web/sitegroups/...
0
votes
1
answer
82
views
How to exceed the Sharepoint 5000 threshold in Rest-API Python
I can't use Office365-REST-Python-Client to retrieve Sharepoint files because it's only works on Windows not on Linux - Docker (it throws error:
File "/usr/local/lib/python3.8/site-packages/...
0
votes
1
answer
43
views
Upload Large File to SP Online in Chunks using Rest API - FinishUpload fails
I was trying to upload the a larger file (500mb) to SharePoint Online document library. I followed the way to upload the file in Chunks with the Article:
Programmatically Uploading Large Files In ...
0
votes
0
answers
51
views
SharePoint Online site usage APIs
I want automate site usage data on SharePoint online.
Are there APIs to get site usage data on SharePoint online for the data available on _layouts/15/siteanalytics.aspx?view=19 ?
The API should ...
0
votes
0
answers
155
views
Download a file from SharePoint using REST API in VB.net
My requirement is to download a file from SharePoint (to my local machine) using Rest API and the code to be written in VB.net .
I have installed Visual Studio 2019 and I have the SharePoint link ...
1
vote
2
answers
51
views
How we can monitor users activity on SharePoint online without external analytics?
How can we monitor users activity on SharePoint online pages, such as watching a video or viewing PowerPoint or pdf or reading content on pages and also times that users stay in specific page? I want ...
0
votes
0
answers
17
views
How to display all lists and filter for empty columns?
I'm new to Sharepoint and hope you can help me.
I need to make a "inventory analysis" of our customers Sharepoint lists and export them to Excel.
I want to access this data via the ...
0
votes
0
answers
18
views
Can't connect to Project Server
I'm trying to connect to Project Server (SharePoint 2016) using C# CSOM
string siteUrl = @"http://<host>/pwa/";
string username = @"<user>@<domain>";
...
0
votes
1
answer
44
views
SharePoint Rest API for search functionality on list level
I was wondering is there any rest api endpoint available to utilize the search functionality directly in a list level?
SharePoint is proviiding an option to search/find an item in list view. But is it ...
0
votes
0
answers
55
views
How to obtain access token for SharePoint REST API v1.0
I need to call SharePoint REST API v1.0 endpoints, i.e. https://<any-tenant>.sharepoint.com/_api/web/lists
The caller is a multitenant ASP.NET web app, not related in any way to the tenant of ...