The current NGINX API version 4 specifies an endpoint /http/keyvals/{httpKeyvalZoneName}.
The POST operation only allows a list of entries to be specified if the map is empty.
In order to simplify updates of complete mappings, one would have to either use DELETE to clear the map and then POST with multiple entries to upload the desired list, or use a Javascript handler to run through the list of pairs to set, and then remove any items that were in the original map, but are not supposed to be there in the new map.
This creates unnecessary complexity in my opinion - apart from that, there are issues with race conditions or with the map being temporarily empty between the steps of DELETE and POST. An atomic update of maps should be supported independent of whether they are empty or now. When such updates occur, they should also immediately be propagated if "sync" is specified.
Therefore, I suggest to drop the limitation of only supporting single tuples in POST requests if the map is not empty.
Cheers,
--j.