Refining media api

Jira: WP-1103