finished first version of media ressource api