{"action":"closed","issue":{"url":"https://api.github.com/repos/Geotab/mg-api-node/issues/4","repository_url":"https://api.github.com/repos/Geotab/mg-api-node","labels_url":"https://api.github.com/repos/Geotab/mg-api-node/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/Geotab/mg-api-node/issues/4/comments","events_url":"https://api.github.com/repos/Geotab/mg-api-node/issues/4/events","html_url":"https://github.com/Geotab/mg-api-node/issues/4","id":304827999,"number":4,"title":"Getting names associated with devices in single call","user":{"login":"gciluffo","id":14182616,"avatar_url":"https://avatars1.githubusercontent.com/u/14182616?v=4","gravatar_id":"","url":"https://api.github.com/users/gciluffo","html_url":"https://github.com/gciluffo","followers_url":"https://api.github.com/users/gciluffo/followers","following_url":"https://api.github.com/users/gciluffo/following{/other_user}","gists_url":"https://api.github.com/users/gciluffo/gists{/gist_id}","starred_url":"https://api.github.com/users/gciluffo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gciluffo/subscriptions","organizations_url":"https://api.github.com/users/gciluffo/orgs","repos_url":"https://api.github.com/users/gciluffo/repos","events_url":"https://api.github.com/users/gciluffo/events{/privacy}","received_events_url":"https://api.github.com/users/gciluffo/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-03-13T16:01:19Z","updated_at":"2018-03-14T17:20:53Z","closed_at":"2018-03-14T17:20:53Z","author_association":"NONE","body":"Currently is there a way to call geotab API and get list of deviceId's along with the user that is assigned to that device? Currently we have to GET all logRecords which contains deviceId's and geometry and make a separate call for each record to GET device by ID to get the name associated with that device. So current implementation is similar to this:\r\n\r\n```  \r\n   api.call('Get', {\r\n            'typeName': 'LogRecord',\r\n            'search': {\r\n                'fromDate': new Date().toISOString()\r\n            }\r\n        }, (err, data) => {\r\n           // Iterate through records and make call for each record\r\n        });\r\n```\r\n\r\nThen we have to loop through each item in records array and call for each device to get the name associated with it.\r\n\r\n```\r\napi.call('Get', {\r\n            'typeName': 'Device',\r\n            'search': {\r\n                'id': logData.device.id\r\n            }\r\n        }, (err, result) => {\r\n        });\r\n```\r\nIs there some way we can do an inner join on the data returned on both calls by deviceId?"}}
{"actor":{"display_login":"gciluffo"}}