Questions tagged [api]

Application Programming Interface (API) is a set of functions and procedures allowing the creation of applications that access the features or data of an operating system, application, or other service. When used as a question tag, please be sure to describe in your question which APIs are being used.

111 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
16
votes
3answers
6k views

Getting data from SharePoint Online with an App, service to service

I have registered an App in my SharePoint Online, and I can use it's ID and secret with the Office Dev PnP PowerShell library. Works like a charm. Now the issue is that we are trying to connect to the ...
11
votes
1answer
4k views

The remote server returned an error: (403) Forbidden when accessing office365 site through external APIs

We have built a desktop app that import/exports SharePoint lists into/from Office 365 sites. The app works perfectly, and we were able to do the import/export of Office 365 site pages for many clients ...
3
votes
1answer
443 views

Handling The SharePoint REST API Search Threshold Limit In powershell

We are using SharePoint Online. I would like to search in all sitecollections for the word "passport". I make it working with the REST api in powershell. But I have now only the problem that it ...
3
votes
0answers
43 views

Reaching subsites of SharePoint domain

I am writing an application that scrapes all the files from a given SharePoint site and all of its sub-sites. This worked perfectly when I ran it locally however, now that it's running on a server ...
3
votes
0answers
338 views

Update metadata w/2013 REST API in a Workflow

I am looking for an example of a REST PUT/MERGE method done from a workflow (no code) in SharePoint Designer to update a metadata field in a library. Specifically what the Build Dictionary and Call ...
2
votes
0answers
27 views

Programmatically grant app permissions to site collection?

Is there an API that let's me register an application (App ID) to a site collection like I would do in the below dialog?
2
votes
1answer
165 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 ...
2
votes
0answers
114 views

How do I monitor SharePoint Online API usage?

Our company stores projects in Office 365 SharePoint Online, creating one site per project utilizing site templates. We then use SharePoint Workflows, PowerBI, Microsoft Flow, PowerApps, and custom C#...
2
votes
0answers
751 views

Access-Control-Allow-Origin' not allowed access SharePoint Ajax call cross domain

I am trying to access cross domain service using ajax call in sharepoint. getting below error Failed to "Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-...
2
votes
0answers
741 views

is on-premise Sharepoint 2016 REST API possible with oauth?

I have a Sharepoint 2016 server and a python web server. I would like to read data from Sharepoint with my python server. I was able to do this on Office 365 on the cloud but did not find much ...
2
votes
0answers
40 views

Unable to get all worksheets ranges with REST API

Maybe I am doing something wrong or I didn't get the way to get my data. I tried to call: curl -k --ntlm --user user:pwd https://sharepoint.server/dept/_vti_bin/ExcelRest.aspx/Department/mydoc/...
2
votes
1answer
578 views

How to get SharePoint survey graphical view results using API call?

I have create the survey list in SharePoint 2013.i have added some questions in it.i need to get the graphical response view using API call or programmatically. I need to display my own view in ...
2
votes
0answers
97 views

Add .aspx file via REST

I'm able to add a .txt file to my Sharepoint library by posting to this URL: https://my_subdomain.sharepoint.com/sites/my_path/_api/web/GetFolderByServerRelativeUrl('/sites/my_path/Pages')/Files/add(...
2
votes
0answers
448 views

SharePoint Online : Using REST API for getting list items return null

I am trying to create a Sharepoint hosted add-ins to get data list items. My code are below var hostweburl; var appweburl; //The SharePoint site where the App is installed hostweburl = ...
2
votes
2answers
909 views

Upload files with REST or alternatives

I need some help with Server to Server upload. (not from the browser) Has anyone uploaded files to sharepoint 2013, using REST, or other methods from a server (java/coldfusion/other). I am getting a ...
2
votes
1answer
1k views

Using html2Canvas API to generate images of custom aspx pages

So I have an html table I'd like to convert to an image and I found a pretty neat API to do exactly this. It's called html2canvas. I have been able to use it pretty easily using HTML pages in my ...
2
votes
2answers
4k views

Create an item with REST API from workflow - SharePoint 2013

The main idea of this is to create an item from workflow in another list which is located on different site collection. So I thought is it possible to create an item in list with REST API through the ...
1
vote
0answers
28 views

why returned date from version history is different from actual date (triggerbody)

It seems the SP data repository and front-end SP list use two different timezones. when I get a date from version history it is different from what is actually shown in the SP list, how can I fix this?...
1
vote
0answers
31 views

Is there an API or web service for Copy-SPSite?

What API endpoint is called for the command Copy-SPSite? Also, is there a WSDL web service for this command, like there is the ExportWeb service in Sites.asmx relating to the command Export-SPWeb?
1
vote
0answers
79 views

Problem making 3rd party API POST calls using SPFx

I need to fetch few details from the 3rd party API so I am making a POST request (required by the API) to that API using HttpClient But every time I am getting the below error. Access to fetch at '...
1
vote
2answers
460 views

MS Graph presence - forbidden 403 error

I'm getting 403 forbidden error in my SPFx web part when trying to access Teams presence (mine and other users as well). I have set permissions in package-solution: Permissions: { "resource": "...
1
vote
0answers
82 views

SP.Utilities.Utility.SendEmail Anonymous User

I have a public website made with on premise sharepoint. Can I use rest api (SP.Utilities.Utility.SendEmail) to send email with anonymous user? I am trying but didn't work.
1
vote
1answer
974 views

Microsoft Graph/Sharepoint API search

The Graph API isn't well documented about a few things, and so I was wondering if anyone had some insight, or direct answers to the following problem: Background I am attempting to create a RESTful ...
1
vote
0answers
132 views

How to use RowsPerPage in the REST API

Whenever I send a request with RowsPerPage set, either via GET or POST, more rows than the RowsPerPage value are returned. RowLimit works though. /_api/search/query?querytext='sharepoint'&...
1
vote
0answers
507 views

How to use external API in sharepoint online or in SPFX?

I am trying to integrate the Microsoft Translator Text API to a SharePoint online site, and the method that I am using is with sharepoint framework webpart. but when I press the button to do the API ...
1
vote
1answer
1k views

Rest queries on ProjectOnline should use _API/ProjectData or _API/ProjectServer?

I've been trying to identify what is the correct way to get data from Project Online for some time now (I just want to get data, not update it). I can find documentation on ProjectData and a lot of ...
1
vote
2answers
1k views

Sharepoint REST API: Get filtered results of files in a document library subfolder and sub-subfolders

Let’s say I have a Document Library “Documents” with structured folders like this: - Folder1(ID1) - SubfolderA(ID3) file-1-in-SubFolderA(ID4).txt file-2-in-SubFolderA(ID5)...
1
vote
0answers
110 views

REST API - Filter Available Fields Choice Results?

We have a very large choice (nearly 20,000 options!!!) field that we want to be able to retrieve the choices, and preferably filter them on the server side. This is the call to get the options _api/...
1
vote
0answers
69 views

SharePoint change author

Is it possible to change the Author of a discussion list using the API in SharePoint 2016? I am trying to update a discussion list author with the user ID19. This is what the curl request would look ...
1
vote
0answers
190 views

Uploading PDFs via the SharePoint Graph API without using Binary?

I am able to upload to the SharePoint Graph API via client-side JavaScript when I send the data in binary. However, I need to send PDF files via a server-side connection and when I do this the data ...
1
vote
1answer
197 views

Get all list's values using REST API - ERROR

I'm trying to get all values from a list and print it to screen. I have a column named 'tz' and I want to print it only. I use this code, but I am getting an error: Unable to get property '0' of ...
1
vote
0answers
35 views

Which API to use for my application to SharePoint online?

I am new to SharePoint, need some guide on the choosing the API. I being read a lot of info last few days by its still very confusion to me. https://dev.office.com/sharepoint/docs/general-development/...
1
vote
0answers
86 views

SP Hosted-AddIn - Pass body parameter to SP.WebRequestInfo() object

I want to pass body parameters to my post request, how to do this? In msdn article haves only example with GET request.. This is my code for get request(Its working): function webProxy() { ...
1
vote
1answer
246 views

SP2010 API: How to insert data into list with folders

I have used SPServices for a long time, both creating, deleting and getting list items from my sharepoint sites. Now I got a new site, and in this site the previous developer has created lists with ...
1
vote
1answer
30 views

How to access a Sharepoint's API on LogicApps?

I'm trying to connect to Sharepoint's API. So when I create an account on CRM I need , with LogicApps, access a sharepoint site and create a Group. When i am testing the api access on Postman I have ...
1
vote
0answers
164 views

SharePoint 2016 compatibility

Does anyone know the link to API or document for API in SharePoint 2016? We are currently using '.Net client API' for SharePoint 2013 and want to check if the methods used from it will still be ...
1
vote
3answers
736 views

How to create a Request Http “GET” to url

I want to make a request http Webservice API to https://sms.vietguys.biz/api/u=[user]&pwd=[password]&from=[Title]&phone=[phonenumber]&sms=[ContentSMS] using javascript. Can I do ...
1
vote
1answer
518 views

REST - Get expanded property data for use in angular

I am trying to figure out how to get the expanded property data and be able to use that data in my angular code. REST call to get expanded property Data: /_api/Web/GetFolderByServerRelativeUrl('...
1
vote
1answer
277 views

Create File using SharePoint REST API call But It couldn't edit or view

url: http://site url/_api/web/GetFolderByServerRelativeUrl('/Document')/Files/add(url='abc.docx',overwrite=true), method: POST, body: "This is my doc", Headers: Authorization: "Bearer " + ...
1
vote
0answers
159 views

Access Denied when trying to create an item with SharePoint API

I am using OAuth to authenticate a client to access SharePoint and create some files. I have the access token and can access endpoints with no issues. However, when it comes to creating items, I am ...
1
vote
1answer
116 views

what is different between office 365 SharePoint and SharePoint on-premise? (using API)

I want to develop application that can access SharePoint on-premise server and download files from that server. I already developed JAVA application using REST API of Office 365 SharePoint. so what ...
1
vote
2answers
3k views

Is there any way to overcome URL length limitation in REST API “GET” Requests?

Is there any way to overcome the 2083 characters limit using REST API GET request itself.
1
vote
0answers
437 views

Adding documents into a Document Set folder in SPO by busing Javascript

I am working on a project where I have to build the logic to upload documents into document set folders and I am stuck building the end point. Can we work with document sets in the same way we do it ...
1
vote
0answers
24 views

Prevent SharePoint from sending emails when changing elements via API

I'm about to remove attachments in around 10k list items via SOAP API, how do I prevent email notifications about this?
1
vote
0answers
88 views

Connecting outside database via WEB API's to SPO

Has anyone been able to automate a connection to an outside source that uses WEB API's? We use Deltek Vision in the cloud, and would like to be able to automate some information to carry over from ...
0
votes
0answers
6 views

Upload Files >250MB via Sharepoint REST API

So I am trying to upload Files to a Sharepoint Site via the REST API. I am already using the /Files/Add() Path-Function, but that one is (from what I've found) per design locked to 250MB max and ...
0
votes
1answer
21 views

SharePoint Online Active Authentication with Two Factor Authentication

Is there a way to make the implementation suggested by Vitaly Lyamin, working with Two Factor Authentication? https://docs.microsoft.com/it-it/archive/blogs/sharepointdevelopersupport/sharepoint-...
0
votes
0answers
14 views

What's the difference between granting addin permission from Azure AD and from appinv.aspx?

When building private SharePoint Addin, API permission can be granted either : from the authorized API tab in registered application in the Azure AD portal or from the /_layouts/15/appinv.aspx from a ...
0
votes
1answer
23 views

Property 'getFolderByServerRelativeUrl' does not exist on type 'IWeb'

I can not access getFolderByServerRelativeUrl() in pnp API. await sp.web.getFolderByServerRelativeUrl() Error: Property 'getFolderByServerRelativeUrl' does not exist on type 'IWeb'.
0
votes
1answer
22 views

Failed to Fetch Error while calling Azure Function

I am calling an Azure Function which is publicly accessible from my SPFx web part. It is a POST Request and I am getting a Failed to Fetch error. The same API call is working fine if I execute it from ...