How to associate a new upload with a previous post via the API

awesome, it works and the API auto-updates the post_uploads table to give me warm fuzzies