skip to main content
OData Method Reference : HTTP POST and MERGE (update)
 

Try DataDirect Cloud Now

HTTP POST and MERGE (update)

Purpose

Update an entity using the custom X-HTTP-Method header with a value of MERGE. The body of the request should contain an entity description of the properties of the entity to be changed.
Note: DataDirect Cloud neither supports HTTP UPDATE nor OData PUT semantics.

URL

https://service.datadirectcloud.com/api/odata/<entity collection><entity instance>

Method

POST

Syntax

The request uses the following format:
POST <base>/Customers(123)
accept: application/<content-type>[,<content-type>]
X-HTTP-Method: MERGE

Response

None.

Response Status

If the entity is successfully updated, the OData service returns a 204 No Content status.

Restrictions

You cannot update a property that is part of the primary key; if you supply a value, DataDirect Cloud will ignore it. If a property in the entity description does not correspond to a property in the entity, then an error with a 400 Bad Request status is returned.
An HTTP request with the method set to MERGE is not supported and will return a 405 Method Not Supported response status.

Authentication

Basic Authentication using Login ID and Password. The authenticated user must use same credentials used to create the Data Source definition.

Authorization

Any active DataDirect Cloud user. The authenticated user must be the owner of the data source.