REST CRUD (Insert,Update,Delete,Get) Operations Using SharePoint Hosted App - Office 365 - Part One

SharePoint adds the ability for you to remotely interact with SharePoint sites by using REST. Now, you can interact directly with SharePoint objects by using any technology that supports standard REST capabilities.

You can perform basic create, read, update, and delete (CRUD) operations by using the Representational State Transfer (REST) interface provided by SharePoint.

In this article we will do CRUD operations using REST. For understanding purposes I am going to divide this article into two parts. The first two points I will discuss in this article; the  remaining four points I will discuss in another article.

  1. Create List in Office 365 SharePoint Site
  2. Creation of Project using SharePoint Hosted App
  3. Html code for User Interface
  4. Write Business logic for Insert, Update, Delete, Get data functionalities.
  5. Deploy the Project
  6. Test the application.
Create List in Office 365 SharePoint Site
  • Login to Office 365 SharePoint and Create List in site.
  • In this case, I have created the list name Employee and created three columns EmpName (Default Title column name changed to EmpName), Salary and Address.

    SharePoint  
Creation of Project using SharePoint Hosted App

Find the below steps to create the project.

  • Select SharePoint Add- in template
  • Give the Proper Name for the project. In this case I have given project name spRESTCrudOperations.

    SharePoint
  • Give the SharePoint Site URL and select SharePoint Hosted App option.

    SharePoint
  • Give Office 365 credentials and click on finish button

    SharePoint

    SharePoint
  • Once you click on Finish button, project will be created.

    SharePoint
  • In solution explorer, you can find SharePoint hosted app structure. Contains Default pages, Scripts, AppManifest file

    SharePoint
  • AppManifest file looks like this.

    SharePoint

  • App.js file looks like this under Scripts

    SharePoint
  • Default.aspx looks like this under Pages.

    SharePoint

In the next article will see remaining points on how to implement. Please look into the next article here.