How can I retrive the media url from the routes showing only the id in the media object

You can use “populate” attribute on query.

An example

Article: {
    title,
    content,
    media
}

add to endpoint of articles populate param, and you get all data of media object.
/api/articles?populate=*