add /media endpoint to api