Add update endpoint to API

These changes are completely untested and should not be merged yet. The pull request is just FYI.
docs for this would be nice so we can start to get the agent's api documented too.