import requests


def get_api_data(session, url, date_time):
    """Get the JSON-formatted response from the AMM API for the desired
    date-time.
    """
    session = session or requests.Session()
    return session.get(url, params={"dt": date_time.format("DD/MM/YYYY")}).json()