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