add __getitem__ to api to get device by iden