def trigger_event(connection, id, fields=None, error_msg=None):
    """Trigger an event.

    Args:
        connection(object): MicroStrategy connection object returned by
            `connection.Connection()`.
        id(str): ID of the event
        error_msg (string, optional): Custom Error Message for Error Handling

    Returns:
        HTTP response object returned by the MicroStrategy REST server.
    """
    url = f'{connection.base_url}/api/events/{id}/trigger'
    return connection.post(
        url=url,
        params={'fields': fields}
    )