POST /api/v2/table/{path}/document/{id}

Updates a partial document by id in a HPE Ezmeral Data Fabric Database JSON table using mutations

Parameters

Name Description
path

string

(path)

Required: Path to the HPE Ezmeral Data Fabric Database JSON table
id

string

(path)

Required: Id of the document to update. If the document does not exist, inserts a new document.
condition

string

(query)

Query condition (in JSON format) used to perform OJAI DocumentStore.checkAndUpdate evaluation. See OJAI Query Condition Syntax for a description of the syntax.
body

(body)

Required: The mutation specifying updates to the document. See Using OJAI Mutation Syntax for a description of the syntax.

Request Example

The following updates the first_name field the document in /apps/employees with id user001, replacing the field with the value Jay:
curl -X POST \
'https://10.10.100.42:8243/api/v2/table/%2Fapps%2Femployees/document/user001' \
  -H 'Content-Type: application/json' \
  -u root:mapr \
  -d '{"$set":{"first_name":"Jay"}}'

Response Example

200 OK