Which set of APIs should be used for Office365 Sharepoint - sharepoint

Which set of APIs should be use to access Office365 sharepoint which includes both sharepoint2013 and sharepoint2016.
Have gone through the following APIs
1) Sharepoint2013 REST APIs(https://msdn.microsoft.com/en-us/library/office/jj860569.aspx).
2) OneDrive new APIs(https://github.com/OneDrive/onedrive-api-docs) through which we can access the Directory folder which contains directory and files. But the present focus of APIs are for OneDrive Personal and Business.
Apart from this is there any other APIs which can access the office365 sharepoint?

You could use SharePoint REST API to retrieve, update, and manage data in Sharepoint Online ,you could find code samples and videos from here.
With Graph API you could get files/users/groups ,but SharePoint sites and lists are not yet available via Microsoft Graph .
In addition ,you could also use SharePoint client object model (CSOM) to manage data in Sharepoint Online,please read below article:
Connect to SharePoint Online using Client Object Model

Related

Access Sharepoint List from Teams Tab created using Teams toolkit

I am currently using Graph APIs to connect to share point list from the Teams tab(NOT SPFX TAB) that I created using Teams Toolkit. I would like to know if it's possible to use REST API or PNP library to connect to Share point list items other than Graph API.
Thanks.
You can directly use Sharepoint REST API in Teams Tab. Note that you need to update permission for Azure AD app and request for access token with proper permission with TeamsFx SDK to call Sharepoint REST API.

How to get Sharepoint site members with Microsoft Graph API?

I am building an app which checks which member has access to which Sharepoint sites. How do I do that with the Microsoft Graph API?
For OneDrive I can get the user's drives by
graphServiceClient.Users[memberId].Drive.Root.Children.Request()
I would like to do that with Sharepoint sites like this
graphServiceClient.Users[memberId].Sites.Root.Children.Request()
but that is not possible. Any idea waht is the right API to get the all the Sharepoint sites the user have access to?

How to get SharePoint Online List data from Outlook VSTO Addon

I've developed a VSTO add-on for Outlook that my company uses which connects to a SQL database to read/write data. I'd like to change the data source to SharePoint Online since all employees have M365 accounts. This will also allow the add-on to operate outside of the corporate network.
If I setup a SharePoint online site with a few lists, is there a way to have the Outlook VSTO Add-on read/write from the lists?
Also, since the Outlook client is already authenticated, is there a way to bypass any sort of authentication and use the already authenticated Outlook client when talking to SharePoint?
No, you need to consider your add-in as a standalone .Net based application. You can use the SharePoint client object model (CSOM) to retrieve, update, and manage data in SharePoint. Read more about that in the Complete basic operations using SharePoint client library code article.

List Microsoft Sharepoint Sites with Microsoft Graph

I'm working with Microsoft OneDrive and Microsoft Sharepoint using Microsoft Graph, and as I understood:
Url to get file list from logged in user OneDrive is:
/v1.0/me/drive/root/children
Url to get file list from company Sharepoint Documents is:
/v1.0/drive/root/children
So my questing is:
How to list Sharepoint Sites that user is following and upload files to this Sites
This isn't possible yet. You need to use the direct SharePoint API end point to access content from SharePoint Sites.
Graph API supports accessing OneDrive, OneDrive for Business, and the document library for an Office 365 Group only.

accessing files and folders other than sharepoint site's default shared documents using office365 api

Working on windows store apps:
I am trying to access the files and folders of office365 documents library.
I can access the one drive documents as described in this link Common file tasks using the Office 365 client library
But it do not provide a way to access the files and folders in other than onedrive document library.
e.g [https://my-office365-tenant.sharepoint.com/mysite/mydocumentslibrary]
However i had tried a way and it do get the files and folders other than onedrive.
I had not used any capability i created SharePointClient as given below:
var client = new SharePointClient(new Uri("https://my-office365-tenant.sharepoint.com/mysite"),
async () => await AcquireTokenAsync(AuthenticationContext, "https://my-office365-tenant.sharepoint.com"));
IPagedCollection<IItem> items = await client.Files.ExecuteAsync();
In this way i get the files of default "Shared Documents" document library inside "mysite", but i want to get the files and folders of another documents library "mydocumentslibrary" inside same site "mysite".
Can anyone please guide me how to do that or am i missing something? or there is anyother way to do this using office365 api only.
I just went through the documentation of this new API, it seems the file operation is limited to the one drive, I doubt you can get file in another document library.
To get files in other document library, as you're developing windows store APPs, you can SharePoint mobile object model or REST APIs:
Overview of the SharePoint 2013 mobile object model
Get started withthe SharePoint 2013 REST service
The APIs allows access only to default document library. Example:
OneDrive for Business: https://{tenant}-my.sharepoint.com/_api/v1.0/me
SharePoint sites: https://{tenant}.sharepoint.com/{site-path}/_api/v1.0

Resources