query device API