Use PUT and MERGE operations to update existing SharePoint objects. If you attempt to set a read-only property as part of a POST operation, the service returns an exception. For POST operations, any properties that are not required are set to their default values. For example, you could send a POST command that included a new list object definition in ATOM to the following URL, to create a SharePoint list: The SharePoint REST service supports sending POST commands that include object definitions to endpoints that represent collections. In SharePoint, use POST to create entities such as lists and sites. Typically, endpoints that represent Read operations map to HTTP GET commands, endpoints that represent create operations map to HTTP POST commands, and endpoints that represent update or insert operations map to HTTP PUT commands. By using HTTP requests, you can use these REST endpoints to perform typical CRUD ( Create, Read, Update, and Delete) operations against SharePoint entities, such as lists and sites. The endpoints in the SharePoint REST service correspond to the types and members in the SharePoint client object models.
HTTP operations in SharePoint REST services
Instead, you make HTTP requests to the appropriate endpoints to retrieve or update SharePoint entities, such as webs, lists, and list items.įor an introduction to the SharePoint REST interface and its architecture, see Get to know the SharePoint REST service.įor information about how to work with core SharePoint entities, see Working with lists and list items with REST and Working with folders and files with REST.įor a sample that shows you how to do many of these operations in the context of an ASP.NET web application written in C#, see SharePoint-Add-in-REST-OData-BasicDataOperations.įor information about the sets of APIs available on the SharePoint platform, see Choose the right API set in SharePoint.įor information about how to use the other client APIs, see: One advantage of using REST is that you don't have to add references to any SharePoint libraries or client assemblies. The REST interface exposes all the SharePoint entities and operations that are available in the other SharePoint client APIs. You can perform basic create, read, update, and delete (CRUD) operations by using the Representational State Transfer (REST) interface provided by SharePoint.