TC-1668 Added used device ids to API, added sample, changed parameters f...

...rom String to Map, fixed typos