def METHOD_NAME(self, request):
    try:
        payload = json.loads(request.body)
    except Exception:
        raise SuspiciousOperation("Could not load request body")
    try:
        self.event = payload["input"]
        self.serial_number = self.event["host"]["serial"]
    except KeyError:
        raise SuspiciousOperation("Could not find machine serial number")
    if not self.serial_number:
        raise SuspiciousOperation("Empty serial number")