import requests


def get_registered_mars(management_url: str) -> dict:
    """
    View all registered mar files.

    Parameters:
        management_url (str): TorchServe management url
    Return:
        registered_mars (dict)
    """
    management_url = management_url.rstrip("/")
    registered_mars_url = f"{management_url}/models"
    res = requests.get(registered_mars_url)
    return res.json()