shell> curl -X PATCH --data-binary @- --dump - http://localhost:8529/_api/document/products/10295 <<EOF
{
"hello" : "world"
}
EOF
HTTP/1.1 202 Accepted
content-type: application/json; charset=utf-8
etag: "10299"
location: /_db/_system/_api/document/products/10295
{
"_id" : "products/10295",
"_key" : "10295",
"_oldRev" : "10295",
"_rev" : "10299"
}
shell> curl -X PATCH --data-binary @- --dump - http://localhost:8529/_api/document/products/10295 <<EOF
{
"numbers" : {
"one" : 1,
"two" : 2,
"three" : 3,
"empty" : null
}
}
EOF
HTTP/1.1 202 Accepted
content-type: application/json; charset=utf-8
etag: "10302"
location: /_db/_system/_api/document/products/10295
{
"_id" : "products/10295",
"_key" : "10295",
"_oldRev" : "10299",
"_rev" : "10302"
}
shell> curl --dump - http://localhost:8529/_api/document/products/10295
HTTP/1.1 200 OK
etag: "10302"
content-type: application/json; charset=utf-8
{
"_id" : "products/10295",
"_key" : "10295",
"_rev" : "10302",
"hello" : "world",
"numbers" : {
"empty" : null,
"one" : 1,
"three" : 3,
"two" : 2
},
"one" : "world"
}
shell> curl -X PATCH --data-binary @- --dump - http://localhost:8529/_api/document/products/10295?keepNull=false <<EOF
{
"hello" : null,
"numbers" : {
"four" : 4
}
}
EOF
HTTP/1.1 202 Accepted
content-type: application/json; charset=utf-8
etag: "10306"
location: /_db/_system/_api/document/products/10295
{
"_id" : "products/10295",
"_key" : "10295",
"_oldRev" : "10302",
"_rev" : "10306"
}
shell> curl --dump - http://localhost:8529/_api/document/products/10295
HTTP/1.1 200 OK
etag: "10306"
content-type: application/json; charset=utf-8
{
"_id" : "products/10295",
"_key" : "10295",
"_rev" : "10306",
"numbers" : {
"empty" : null,
"four" : 4,
"one" : 1,
"three" : 3,
"two" : 2
},
"one" : "world"
}