{"id":340,"date":"2024-03-14T10:42:47","date_gmt":"2024-03-14T09:42:47","guid":{"rendered":"https:\/\/kb.apptec360.com\/manual\/?post_type=knowledgebase&#038;p=340"},"modified":"2024-04-25T08:37:55","modified_gmt":"2024-04-25T06:37:55","slug":"general-rules","status":"publish","type":"knowledgebase","link":"https:\/\/kb.apptec360.com\/manual\/knowledgebase\/general-settings\/role-based-access\/api-access\/general-rules\/","title":{"rendered":"General Rules"},"content":{"rendered":"\n<ul class=\"wp-block-list\">\n<li>The REST API is available below the base URL:<\/li>\n<\/ul>\n\n\n\n<p>\/public\/external\/api<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>All requests have to be send via POST. <\/li>\n\n\n\n<li>The REST API only supports requests via HTTPS. <\/li>\n\n\n\n<li>Requests must contain the following Headers:<\/li>\n<\/ul>\n\n\n\n<table id=\"tablepress-6\" class=\"tablepress tablepress-id-6\">\n<caption style=\"caption-side:bottom;text-align:left;border:none;background:none;margin:0;padding:0;\"><a href=\"https:\/\/kb.apptec360.com\/manual\/wp-admin\/admin.php?page=tablepress&amp;action=edit&amp;table_id=6\" rel=\"nofollow\">Edit<\/a><\/caption>\n<tbody class=\"row-hover\">\n<tr class=\"row-1 odd\">\n\t<td class=\"column-1\"><br>\n        <p>Header Name<\/p><br>\n      <\/td><td class=\"column-2\"><br>\n        <p>Header Value<\/p><br>\n      <\/td><td class=\"column-3\"><br>\n        <p>Description<\/p><br>\n      <\/td>\n<\/tr>\n<tr class=\"row-2 even\">\n\t<td class=\"column-1\"><br>\n        <p>Content-type<\/p><br>\n      <\/td><td class=\"column-2\"><br>\n        <p>application\/json<\/p><br>\n      <\/td><td class=\"column-3\"><br>\n        <p>fixed<\/p><br>\n      <\/td>\n<\/tr>\n<tr class=\"row-3 odd\">\n\t<td class=\"column-1\"><br>\n        <p>auth<\/p><br>\n      <\/td><td class=\"column-2\"><br>\n        <p>123&#8230;xyz<\/p><br>\n      <\/td><td class=\"column-3\"><br>\n        <p>API Key from the &#8220;API Access&#8221; Tab<\/p><br>\n      <\/td>\n<\/tr>\n<tr class=\"row-4 even\">\n\t<td class=\"column-1\"><br>\n        <p>signature<\/p><br>\n      <\/td><td class=\"column-2\"><br>\n        <p>Base64 encoded signature<\/p><br>\n      <\/td><td class=\"column-3\"><br>\n        <p>Signature of the payload generated with the<\/p><br>\n        <p>private Key from the &#8220;API Access&#8221; Tab<\/p><br>\n      <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The request body must be a json encoded object which must contain the following values:<\/li>\n<\/ul>\n\n\n\n<div class=\"pagebreak-after\"><\/div>\n\n\n\n<table id=\"tablepress-7\" class=\"tablepress tablepress-id-7\">\n<caption style=\"caption-side:bottom;text-align:left;border:none;background:none;margin:0;padding:0;\"><a href=\"https:\/\/kb.apptec360.com\/manual\/wp-admin\/admin.php?page=tablepress&amp;action=edit&amp;table_id=7\" rel=\"nofollow\">Edit<\/a><\/caption>\n<tbody class=\"row-hover\">\n<tr class=\"row-1 odd\">\n\t<td class=\"column-1\"><br>\n        <p>Field<\/p><br>\n      <\/td><td class=\"column-2\"><br>\n        <p>Field Example Value<\/p><br>\n      <\/td><td class=\"column-3\"><br>\n        <p>Description<\/p><br>\n      <\/td>\n<\/tr>\n<tr class=\"row-2 even\">\n\t<td class=\"column-1\"><br>\n        <p>api<\/p><br>\n      <\/td><td class=\"column-2\"><br>\n        <p>v2\/device\/listdevices<\/p><br>\n      <\/td><td class=\"column-3\"><br>\n        <p>Name of the API<\/p><br>\n      <\/td>\n<\/tr>\n<tr class=\"row-3 odd\">\n\t<td class=\"column-1\"><br>\n        <p>time<\/p><br>\n      <\/td><td class=\"column-2\"><br>\n        <p>1529662725<\/p><br>\n      <\/td><td class=\"column-3\"><br>\n        <p>Unix Timestamp (UTC) of the client machine.<\/p><br>\n        <p>The maximum allowed time difference<\/p><br>\n        <p>between the client and the server is 30<\/p><br>\n        <p>minutes.<\/p><br>\n      <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n\n\n\n<ul class=\"wp-block-list\">\n<li>On success the API returns the requested data (see the Queries below) and an HTTP status code 200.<\/li>\n\n\n\n<li>If an error occurs, the HTTP status code will be between 4xx and 5xx depending on error and the response object will contain an array with the key \u201cerrors\u201d, which contains a list of human readable error messages.<\/li>\n\n\n\n<li>If there is no matching data for a device an empty array will be returned.<\/li>\n\n\n\n<li>If a device Id does not exist it\u2019s return data will be null.<\/li>\n<\/ul>\n","protected":false},"parent":336,"menu_order":0,"template":"","class_list":["post-340","knowledgebase","type-knowledgebase","status-publish","hentry"],"acf":[],"_links":{"self":[{"href":"https:\/\/kb.apptec360.com\/manual\/wp-json\/wp\/v2\/knowledgebase\/340","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kb.apptec360.com\/manual\/wp-json\/wp\/v2\/knowledgebase"}],"about":[{"href":"https:\/\/kb.apptec360.com\/manual\/wp-json\/wp\/v2\/types\/knowledgebase"}],"version-history":[{"count":7,"href":"https:\/\/kb.apptec360.com\/manual\/wp-json\/wp\/v2\/knowledgebase\/340\/revisions"}],"predecessor-version":[{"id":6519,"href":"https:\/\/kb.apptec360.com\/manual\/wp-json\/wp\/v2\/knowledgebase\/340\/revisions\/6519"}],"up":[{"embeddable":true,"href":"https:\/\/kb.apptec360.com\/manual\/wp-json\/wp\/v2\/knowledgebase\/336"}],"wp:attachment":[{"href":"https:\/\/kb.apptec360.com\/manual\/wp-json\/wp\/v2\/media?parent=340"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}