Fixed rest-api python samples to correctly work with latest Rest api