HTTP PATCH or POST and PATCH (update)
- Last Updated: April 14, 2020
- 1 minute read
- Hybrid Data Pipeline
- Version 5.0
- Documentation
Purpose
HTTP PATCH updates an entity. You can also use HTTP
POST and specify PATCH as the value of the
custom X-HTTP-Method header. The body of the
request should contain an entity description of the properties of the entity to be
changed.
HTTP UPDATE nor OData PUT semantics. URL
https://<myserver>:<port>/api/odata4/<entity collection>/<entity instance>
where <myserver> is the DSN name or the IP address of the machine where Hybrid Data Pipeline is installed.
Method
PATCH | POST with a X-HTTP-Method header
value of PATCH.
Syntax
The request uses the following formats:
PATCH https://myserver:8080/api/odata4/Customers(123)
accept: application/<content-type>[,<content-type>]
POST https://myserver:8080/api/odata4/Customers(123)
accept: application/<content-type>[,<content-type>]
X-HTTP-Method: PATCH
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, Hybrid Data Pipeline 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 Hybrid Data Pipeline user. The authenticated user must be the owner of the data source.