OneDrive 开发人员平台OneDrive developer platform

OneDrive 开发人员平台提供了将应用程序连接到 Office 365 的文件和内容的 API、组件和工具,具体包括:The OneDrive developer platform provides services and tools to connect your application to files across Office 365, including:

  • OneDrive 个人版OneDrive personal
  • OneDrive for BusinessOneDrive for Business
  • SharePoint OnlineSharePoint Online
  • SharePoint Server 2016SharePoint Server 2016

使用 OneDrive 开发平台,解决方案可以处理 Office 365 生态系统中的文件,并编写相同的代码,为企业客户启用适用于使用者的解决方案。The OneDrive developer platform allows your solution to work with files across the Office 365 ecosystem and write the same code to enable solutions for consumers to enterprise customers. OneDrive API 属于 Microsoft Graph 的常见 Microsoft 服务 API。OneDrive APIs are a part of the Microsoft Graph, a common API for Microsoft services.

我们的开发人员内容旨在帮助用户了解如何以及为什么要与 OneDrive 内容进行集成,以便可以让解决方案快速运行。Our developer content is designed to help you learn how and why to integrate with OneDrive content so that you can quickly get your solution running.

快速集成的共享组件Shared components for quick integrations

OneDrive 提供文件选取器共享控件,使用该控件可快速轻松地打开、保存和创建存储在 OneDrive 或 SharePoint 团队网站中的文件的共享链接。OneDrive offers the file picker shared control, which makes it quick and easy to open, save, and create sharing links to files stored in OneDrive or SharePoint team sites.

使用文件选取器,可以在几分钟内将现有的应用程序连接到 OneDrive,同时为用户启用一个全新方案。Using the file picker, you can connect your existing application to OneDrive in a matter of minutes, while enabling a whole new scenario for your users.

与 Microsoft Graph 集成Sending with Microsoft Graph

OneDrive、OneDrive for Business 和 SharePoint 文档库均可通过 Microsoft Graph API 进行访问。OneDrive, OneDrive for Business, and SharePoint document libraries can all be accessed via the Microsoft Graph API. Microsoft Graph 提供一个 API 终结点,用于访问各种 Microsoft 服务,可轻松地在不同服务之间进行互连。Microsoft Graph provides a single API endpoint for accessing a variety of Microsoft services, and makes it easy to interconnect between different services.

查看 API 参考,了解有关通过 Microsoft Graph 访问 OneDrive 和 SharePoint 的完整详细信息。View the API Reference for the complete details on accessing OneDrive and SharePoint via Microsoft Graph.

若要了解有关 Microsoft Graph 的详细信息,请访问 Microsoft Graph 开发人员门户To learn more about Microsoft Graph, visit the Microsoft Graph developer portal.

OneDrive API 还可直接与 SharePoint Server 2016 结合使用。OneDrive API is also available directly with SharePoint Server 2016. 发行说明中了解有关将 OneDrive API 与 SharePoint Server 2016 结合使用的详细信息。Learn more about using OneDrive API with SharePoint Server 2016 in the release notes.

将应用引入 OneDriveBring your app into OneDrive

通过生成 Office 365 文件处理程序,可以将应用程序的体验引入 OneDrive 和 SharePoint 产品。By building an Office 365 file handler you can bring the experience of your application into the OneDrive and SharePoint products. 借助文件处理程序,应用能够在 OneDrive 中提供自定义用户体验,以创建、预览、打开存储于 Office 365 中的文件,或对其进行操作。File handlers give your app the ability to provide a custom user experience inside OneDrive to create, preview, open, or act on files stored in Office 365.

文件处理程序允许你为所有内容存储在 OneDrive 或 SharePoint 中的用户提供无缝的体验。File handlers allow you to provide a seamless experience for your users for all content stored in OneDrive or SharePoint. 不会再提示用户_下载_文件,而改为直接将用户转到应用以进行查看或编辑。No longer will users be prompted to download your files, but instead they will be taken directly into your app to view or edit.

示例代码Sample Code

为了帮助用户快速入门,我们提供大量以 ASP.NET、JavaScript、Objective-C、C-Sharp 和 Android Java 编写的示例代码项目To get you started quickly, we have a number of sample code projects written in ASP.NET, JavaScript, Objective-C, C-Sharp, and Android Java.