Hi Alessandro,
Here is ready solution for you:
1 Create REST service. Call it "getDevices".
2 Open this service.
3 Navigate to "Settings" tab and populate it with folowing settings: http://prntscr.com/4pevbj/direct
pre
URL - {database_url}/collections/_devices
Settings - your DB settings.
/pre
4 Open request tab. Navigate to "header" section. And add two parameters: http://prntscr.com/4pewf3/direct
pre
X-Appery-Database-Id - {database_id}
X-Appery-Master-Key - your DB master key
/pre
5 Navigate to "Test" tab and click "test".
6 You will get following result: http://prntscr.com/4pex55/direct
That's all.
Regards.