API: More fixes for POST

It now validates/writes most of the DB data and sends the gearman message

Change-Id: I9b3fae15f08470c2ee57ad8af435ae1aaa9a4ab0
Merge "API: More fixes for POST"