PUT /api/v2/table/{path}/document/{id}
Updates a single document by id in a HPE Data Fabric Database JSON table
Parameters
| Name | Description |
|---|---|
| path
(path) |
Required: Path to the HPE Data Fabric Database JSON table |
| id
(path) |
Required: Id of the document to update. If the document with the specified id does not exist, the mode parameter determines the behavior. |
| condition
(query) |
Query condition (in JSON format) used to perform OJAI
DocumentStore.checkAndReplace evaluation. See OJAI Query Condition Syntax for a
description of the syntax. |
| mode
(query) |
Defines the behavior of the operation. The following are the possible
values:
Default: |
| body (body) |
Required: The body of the new document |
Request Example
The following replaces the document with id
user001 in
/apps/employees with an employee who has only a first
name:curl -X PUT \
'https://10.10.100.42:8243/api/v2/table/%2Fapps%2Femployees/document/user001' \
-H 'Content-Type: application/json' \
-u root:mapr \
-d '{"_id":"user001","first_name":"Jonathan"}'Response Example
200 OK