def METHOD_NAME(group_id):
    if not request.json:
        raise ApiError('nothing to change', 400)
    group = Group.find_by_id(group_id)
    if not group:
        raise ApiError('not found', 404)
    admin_audit_trail.send(current_app._get_current_object(), event='group-updated', message='', user=g.login,
                           customers=g.customers, scopes=g.scopes, resource_id=group.id, type='group', request=request)
    updated = group.update(**request.json)
    if updated:
        return jsonify(status='ok', group=updated.serialize)
    else:
        raise ApiError('failed to update user group', 500)