Update the existing document
Contributors
PATCH /persistence/v1/service/{serviceName}/collection/{collectionName}/account/{accountId}/{documentId}
Updates the existing document of the specified collection. Updates the field values of the original document with the provided values. This operation does not support modifying individual array elements, you must use PATCH on the whole array. If you need to replace the whole document, use the PUT method. The PATCH method returns the modified document.
Parameters
Name | Type | In | Required | Description |
---|---|---|---|---|
serviceName |
string |
path |
True |
Participating external service name (name of the database). |
collectionName |
string |
path |
True |
Persistence Service collection name (name of the table). |
accountId |
string |
path |
True |
Persistence Service Cloud Manager account identifier for Tenancy service specification. |
documentId |
string |
path |
True |
Document identifier displayed in object ID format. |
X-Service-Request-Id |
string |
header |
False |
Request identifier used to tag the request for better supportability. |
Request Body
Response
Status: 200, Default response
Name | Type | Required | Description |
---|---|---|---|
_id |
string |
False |
Persistence Service response document identifier. Auto generated and immutable. |
document |
False |
(Opaque) Persistence service document as a key-value pair passed as a request. |
Example response
{
"_id": "60f51cf96bf74c1eec9be2cc"
}
Response
Status: 4xx, Error response
Name | Type | Required | Description |
---|---|---|---|
errorCode |
string |
False |
Error code |
error |
string |
False |
Error category |
message |
string |
False |
Error description message |
Example response
{
"errorCode": "P1002",
"error": "api error",
"message": "No document found of the specified documentId"
}
Response
Status: 5xx, Error response
Name | Type | Required | Description |
---|---|---|---|
errorCode |
string |
False |
Error code |
error |
string |
False |
Error category |
message |
string |
False |
Error description message |
Example response
{
"errorCode": "P1002",
"error": "api error",
"message": "No document found of the specified documentId"
}
Definitions
PersistenceServiceRequest
(Opaque) Persistence service document as a key-value pair passed as a request.