title | description | author | ms.author | ms.date | ms.topic |
---|---|---|---|---|---|
Data Modification - UPDATE |
Data Modification - UPDATE basics |
madansr7 |
saumadan |
7/1/2019 |
article |
The OData services SHOULD support PATCH as the preferred means of updating an entity. But also services MAY additionally support PUT. The request below update the Emails of a person using PATCH.
PATCH serviceRoot/People('russellwhyte')
OData-Version: 4.0
Content-Type: application/json;odata.metadata=minimal
Accept: application/json
{
"@odata.type" : "Microsoft.OData.SampleService.Models.TripPin.Person",
"Emails" : ["Russell@example.com", "Russell@contoso.com", "newRussell@contoso.com"]
}
Response Payload
HTTP/1.1 204 No Content