How do I upload the standard image for items using the rest api?

Using /api/method/upload_file just uploads it as an attachment. How do I set it as the standard image that appears in the details page of the item?