Name: Project-Add-in-REST-BasicDataOperations
Owner: Office Developer
Description: Use the Project REST endpoints to perform create, read, update, and delete operations on Projects from a Project Add-in
Created: 2016-09-15 06:21:49.0
Updated: 2017-12-28 21:36:05.0
Pushed: 2018-01-31 20:28:21.0
Homepage: null
Size: 42
Language: C#
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Use the Project REST endpoints to perform create, read, update, and delete operations onprojects from a Project Add-in.
Scenario
As a Project/Program/Portfolio portfolio manager, I would like to use an app that displays the projects and allows me create, update and delete projects.
To use this code sample, you need the following:
This sample runs CSOM methods that create, edit the project name and delete projects in the PWA instance for the specified user.
Copyright (c) 2016 Microsoft. All rights reserved.
This sample requires the following:
A SharePoint 2013 (or later) development environment that is configured for add-in isolation and OAuth. (A SharePoint Online Developer Site is automatically configured. For an on premise development environment, see Set up an on-premises development environment for SharePoint Add-ins and Use an Office 365 SharePoint site to authorize provider-hosted add-ins on an on-premises SharePoint site.)
Visual Studio and the Office Developer Tools for Visual Studio installed on your developer computer
Basic familiarity with RESTful web services and OData
The code that uses the REST APIs is located in the Default.aspx.cs file of the SharePoint-Add-in-REST-OData-BasicDataOperationsWeb project. The Default.aspx page of the add-in appears after you install and launch the add-in and looks similar to the following.
The sample demonstrates the following:
How to read and write data to and from a SharePoint host web. This data conforms with the OData protocol to the REST endpoints where the list and list item entities are exposed.
How to parse Atom-formatted XML returned from these endpoints and how to construct JSON-formatted representations of the list and list item entities so that you can perform Create and Update operations on them.
Best practices for retrieving form digest and eTag values that are required for Create and Update operations on lists and list items.
Do not delete any of the built-in SharePoint lists. If you mistakenly do so, recover the list from the SharePoint Recycle Bin.
Problem | Solution |
---|---|
Visual Studio does not open the browser after you press the F5 key. | Set the SharePoint Add-in project as the startup project. |
HTTP error 405 Method not allowed. | Locate the applicationhost.config file in %userprofile%\Documents\IISExpress\config.
Locate the handler entry for StaticFile, and add the verbs GET, HEAD, POST, DEBUG, and TRACE. |
We'd love to get your feedback on this sample. You can send your questions and suggestions to us in the Issues section of this repository.
Get to know the SharePoint 2013 REST service.
OData: JavaScript Object Notation (JSON) Format
Copyright (c) Microsoft. All rights reserved.
This project has adopted the Microsoft Open Source Code of Conduct. For more information, see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.