Added device queries
Added device apis