Fixed the way params were passed to rest-api, properly destroy entity