def METHOD_NAME(self, request, *args, **kwargs):
    jamf_instance = get_object_or_404(JamfInstance, pk=kwargs["pk"])
    api_client = APIClient(**jamf_instance.serialize(decrypt_password=True))
    jamf_instance_base_url = jamf_instance.base_url()
    try:
        setup_msg = api_client.setup()
    except APIClientError:
        msg = "Could not setup webhooks on {}.".format(jamf_instance_base_url)
        messages.warning(request, msg)
        logger.exception(msg)
    else:
        msg = "{}: {}".format(jamf_instance_base_url, setup_msg)
        messages.info(request, msg)
        logger.info(msg)
    return redirect(jamf_instance)