{"id":179843,"date":"2021-05-06T23:32:54","date_gmt":"2021-05-07T06:32:54","guid":{"rendered":"https:\/\/m2msupport.net\/m2msupport\/?page_id=179843"},"modified":"2021-05-06T23:33:33","modified_gmt":"2021-05-07T06:33:33","slug":"get-a-list-iot-devices-in-device-registry-from-google-cloud-platform-gcp-using-iot-cloud-tester","status":"publish","type":"page","link":"https:\/\/m2msupport.net\/m2msupport\/get-a-list-iot-devices-in-device-registry-from-google-cloud-platform-gcp-using-iot-cloud-tester\/","title":{"rendered":"Get a list IoT devices from device registry in Google Cloud Platform (GCP) using IoT Cloud Tester"},"content":{"rendered":"<p>Devices connect to Google Cloud Platform and send\/receive data through MQTT or HTTP.<\/p>\n<p><a href=\"https:\/\/m2msupport.net\/m2msupport\/download-iot-cloud-tester\/\">IoT Cloud Tester<\/a>&nbsp; application provides an easy interface to get the list of devices from a device registry in Google Cloud platform.<\/p>\n<h1>To get the list of devices from a device registry in Google Cloud project,<\/h1>\n<ul>\n<li>Select the project.<\/li>\n<li>In the &#8216;Devices&#8217; tab, select the region, registry and press &#8216;List Devices&#8217;.<\/li>\n<li>The application returns the list of devices, gateways the devices are bounded to, if any and the data model configured for the device.<\/li>\n<\/ul>\n<p><a href=\"https:\/\/m2msupport.net\/m2msupport\/wp-content\/uploads\/2021\/05\/list_devices.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-179846\" src=\"https:\/\/m2msupport.net\/m2msupport\/wp-content\/uploads\/2021\/05\/list_devices.png\" alt=\"\" width=\"851\" height=\"727\" srcset=\"https:\/\/m2msupport.net\/m2msupport\/wp-content\/uploads\/2021\/05\/list_devices.png 851w, https:\/\/m2msupport.net\/m2msupport\/wp-content\/uploads\/2021\/05\/list_devices-300x256.png 300w, https:\/\/m2msupport.net\/m2msupport\/wp-content\/uploads\/2021\/05\/list_devices-768x656.png 768w, https:\/\/m2msupport.net\/m2msupport\/wp-content\/uploads\/2021\/05\/list_devices-600x513.png 600w\" sizes=\"auto, (max-width: 851px) 100vw, 851px\" \/><\/a><\/p>\n<p>To get the device list from a device registry in GCP, a GET request is made to the below URL.<\/p>\n<p><strong>Request sent to GCP to get device list<\/strong><\/p>\n<p>GET:https:\/\/cloudiot.googleapis.com\/v1\/projects\/iot-cloud-tutorial\/locations\/asia-east1\/registries\/reg_193129\/devices?gatewayListOptions.gatewayType=NON_GATEWAY<\/p>\n<p><strong>Response from GCP for device list in a device registry<\/strong><\/p>\n<p>[ {<\/p>\n<p>&#8220;id&#8221; : &#8220;dev_117826&#8221;,<\/p>\n<p>&#8220;numId&#8221; : 3280059495495320<\/p>\n<p>}, {<\/p>\n<p>&#8220;id&#8221; : &#8220;dev_952945&#8221;,<\/p>\n<p>&#8220;numId&#8221; : 3189860822093986<\/p>\n<p>}, {<\/p>\n<p>&#8220;id&#8221; : &#8220;dev_95661&#8221;,<\/p>\n<p>&#8220;numId&#8221; : 3252538596013057<\/p>\n<p>} ]<\/p>\n<p>The device list can be viewed in the GCP console.<\/p>\n<p>https:\/\/console.cloud.google.com\/iot\/locations\/asia-east1\/registries\/reg_193129\/devices?folder=&#038;organizationId=&#038;project=iot-cloud-tutorial<\/p>\n<p><a href=\"https:\/\/m2msupport.net\/m2msupport\/wp-content\/uploads\/2021\/05\/gcp_device_list.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-179847\" src=\"https:\/\/m2msupport.net\/m2msupport\/wp-content\/uploads\/2021\/05\/gcp_device_list.png\" alt=\"\" width=\"1445\" height=\"825\" srcset=\"https:\/\/m2msupport.net\/m2msupport\/wp-content\/uploads\/2021\/05\/gcp_device_list.png 1445w, https:\/\/m2msupport.net\/m2msupport\/wp-content\/uploads\/2021\/05\/gcp_device_list-300x171.png 300w, https:\/\/m2msupport.net\/m2msupport\/wp-content\/uploads\/2021\/05\/gcp_device_list-768x438.png 768w, https:\/\/m2msupport.net\/m2msupport\/wp-content\/uploads\/2021\/05\/gcp_device_list-1024x585.png 1024w, https:\/\/m2msupport.net\/m2msupport\/wp-content\/uploads\/2021\/05\/gcp_device_list-600x343.png 600w\" sizes=\"auto, (max-width: 1445px) 100vw, 1445px\" \/><\/a><\/p>\n<div class=\"video-responsive\"><iframe loading=\"lazy\" id=\"youTubePlayer\" src=\"https:\/\/www.youtube.com\/embed\/rQNKIcT0DA0?hd=1\" width=\"750\" height=\"421\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Devices connect to Google Cloud Platform and send\/receive data through MQTT or HTTP. IoT Cloud Tester&nbsp; application provides an easy interface to get the list of devices from a device registry in Google Cloud platform. To get the list of &hellip; <a href=\"https:\/\/m2msupport.net\/m2msupport\/get-a-list-iot-devices-in-device-registry-from-google-cloud-platform-gcp-using-iot-cloud-tester\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"iot_tutorial_template.php","meta":{"footnotes":""},"class_list":["post-179843","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/m2msupport.net\/m2msupport\/wp-json\/wp\/v2\/pages\/179843","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/m2msupport.net\/m2msupport\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/m2msupport.net\/m2msupport\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/m2msupport.net\/m2msupport\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/m2msupport.net\/m2msupport\/wp-json\/wp\/v2\/comments?post=179843"}],"version-history":[{"count":2,"href":"https:\/\/m2msupport.net\/m2msupport\/wp-json\/wp\/v2\/pages\/179843\/revisions"}],"predecessor-version":[{"id":179850,"href":"https:\/\/m2msupport.net\/m2msupport\/wp-json\/wp\/v2\/pages\/179843\/revisions\/179850"}],"wp:attachment":[{"href":"https:\/\/m2msupport.net\/m2msupport\/wp-json\/wp\/v2\/media?parent=179843"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}