How to update a post using Admin API in Javascript?

This was answered already here Add More API End Points - #11 by Kevin