{"id":19957,"date":"2017-07-14T13:44:54","date_gmt":"2017-07-14T18:44:54","guid":{"rendered":"http:\/\/www.multitech.net\/developer\/?page_id=19957"},"modified":"2022-02-03T13:24:09","modified_gmt":"2022-02-03T19:24:09","slug":"account-api-route","status":"publish","type":"page","link":"https:\/\/www.multitech.net\/developer\/software\/devicehq\/account-api\/account-api-route\/","title":{"rendered":"Account API &#8211; Routes"},"content":{"rendered":"<p>All account API access will be done with routes starting with:<\/p>\n<pre class=\"brush:xml\">\/api\/v2<\/pre>\n<p>For example, to display information for a single device, the HTTPS request\u00a0below yields a json-formatted string containing device information for a device with a serial # of 12341234:<\/p>\n<pre class=\"brush:xml\">GET https:\/\/devicehq.com\/api\/v2\/devices\/12341234<\/pre>\n<p>Devices may be specified by their UUID or their serial #.<\/p>\n<h4>Note:<\/h4>\n<ul>\n<li>The UUID must contain exactly 32 hexadecimal characters.<\/li>\n<li>Any whitespace or non-alphanumeric characters will be stripped.<\/li>\n<li>It is not case sensitive.<\/li>\n<\/ul>\n<p>The following routes are available in the API:<\/p>\n<ul>\n<li>GET \/api\/v2\/info\n<ul>\n<li>Returns basic info about the API. Authentication not required. Useful for testing if API\/v2 is successfully reached, and is up and running.<\/li>\n<\/ul>\n<\/li>\n<li>GET \/api\/v2\/test\n<ul>\n<li>Session and authentication required. Useful for testing if the client is establishing a session and reaching the API. Returns &#8220;OK&#8221; and timestamp if successfully reached.<\/li>\n<\/ul>\n<\/li>\n<li>GET \/api\/v2\/account\n<ul>\n<li>Returns account information for the present account.<\/li>\n<\/ul>\n<\/li>\n<li>GET \/api\/v2\/account\/users\n<ul>\n<li>Returns list of users for the present account.<\/li>\n<\/ul>\n<\/li>\n<li>GET \/api\/v2\/devices\n<ul>\n<li>Returns list of devices. Supports search and pagination (see Account API &#8211; Search and Pagination for more information).<\/li>\n<\/ul>\n<\/li>\n<li>GET \/api\/v2\/devices\/(serial or UUID)\n<ul>\n<li>Returns single device identified by serial# or uuid. Will include all fields that are presently visible when the user clicks on a device in DeviceHQ.com.<\/li>\n<\/ul>\n<\/li>\n<li>GET \/api\/v2\/devices\/(serial or UUID)\/check_ins\n<ul>\n<li>Returns all check-ins for a device going back 30 days.<\/li>\n<\/ul>\n<\/li>\n<li>GET \/api\/v2\/devices\/(serial or UUID)\/signal_strength\n<ul>\n<li>Returns reported signal strength information for a device going back 30 days.<\/li>\n<\/ul>\n<\/li>\n<li>GET \/api\/v2\/devices\/(serial or UUID)\/network\n<ul>\n<li>Returns network usage for a device going back 30 days.<\/li>\n<\/ul>\n<\/li>\n<li>GET \/api\/v2\/devices\/(serial or UUID)\/lora\n<ul>\n<li>Returns LoRa card information for a device going back 30 days.<\/li>\n<\/ul>\n<\/li>\n<li>GET \/api\/v2\/devices\/(serial or UUID)\/logs\n<ul>\n<li>Returns last uploaded (tar\/zip formatted) device logs.<\/li>\n<\/ul>\n<\/li>\n<li>GET \/api\/v2\/devices\/(serial or uuid)\/configs\n<ul>\n<li>Returns last uploaded (tar\/zip formatted) configuration for the device.<\/li>\n<\/ul>\n<\/li>\n<li>PUT \/api\/v2\/devices\/(serial or uuid)\n<ul>\n<li>Accepts updated information and returns for the device. Only fields changeable in\u00a0DeviceHQ<sup>\u00ae<\/sup> can be changed in the API.<\/li>\n<\/ul>\n<\/li>\n<li>POST \/api\/v2\/devices\/register {serial: 12345678, UUID:&#8221;776334cb-8e42-4839-835c-899d075d63ae&#8221;}\n<ul>\n<li>Registers a device with the current account, allowing the &#8220;call-home&#8221; feature to work.<\/li>\n<\/ul>\n<\/li>\n<li>DELETE \/api\/v2\/devices\/(serial or UUID)\n<ul>\n<li>Removes a device and all associated records from the database of DeviceHQ. If the device subsequently checks in, it will be recreated in the same account.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>All account API access will be done with routes starting with: \/api\/v2 For example, to display information for a single device, the HTTPS request\u00a0below yields a json-formatted string containing device information for a device with a serial # of 12341234: GET https:\/\/devicehq.com\/api\/v2\/devices\/12341234 Devices may be specified by their UUID or their serial #. Note: The [&hellip;]<\/p>\n","protected":false},"author":2082,"featured_media":0,"parent":19942,"menu_order":4,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"footnotes":""},"class_list":["post-19957","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/pages\/19957","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/users\/2082"}],"replies":[{"embeddable":true,"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/comments?post=19957"}],"version-history":[{"count":18,"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/pages\/19957\/revisions"}],"predecessor-version":[{"id":28477,"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/pages\/19957\/revisions\/28477"}],"up":[{"embeddable":true,"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/pages\/19942"}],"wp:attachment":[{"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/media?parent=19957"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}