Updating an Existing Resource
Existing resources can be updated using the HTTP PATCH (or HTTP MERGE) method.
Example: Update a Service Request
PATCH http://myserver:5181/odata/ServiceRequest(139239) HTTP/1.1
Content-Length: 48
Content-Type: application/json
{
'Solution': 'Cleaned the printer and replaced part-no LP32893.',
'ActualStart': '2001-07-16T12:00:00',
'ActualDuration':'PT1H',
'ActualCost':'12.54',
'Priority': {
'Text': 'None'
},
'Status': {
'Value': 3120234513,
'Text': 'Waiting'
}
'Impact': {
'Value': 3094610021
},
'ServicecallCode3': {
'@odata.type': '#PROLIN.Web.OData.Model.Code',
'Value': 3094610021
}
}
- Date/time values are assumed to be in UTC.
- Codes can be assigned using their id value, localized text, or both.
- Custom codes require the
@odata.typeannotation.
Editing Entity References
Entity references (including custom references) can be updated using @odata.bind:
{
"Description": "Printer is not working properly.",
"ID": null,
"Information": "The printer in room 14C is causing paperjams all the time.",
"Status": {
"Text": "Waiting",
"Value": 3120234513
},
'Caller@odata.bind': '/Persons(234)',
'ScPerson1@odata.bind': '/Persons(234)'
}
Additional Notes
Duration and date/time formats follow ISO 8601.
More details: ISO 8601 on WikipediaWhen performing a PATCH operation, you can include a Prefer header to request that the updated object be returned.