{"id":4050,"date":"2020-11-24T04:02:50","date_gmt":"2020-11-24T04:02:50","guid":{"rendered":"https:\/\/52.201.54.130\/mobile-device-management\/api\/?page_id=4050"},"modified":"2022-04-12T10:21:45","modified_gmt":"2022-04-12T10:21:45","slug":"list-device-policies","status":"publish","type":"page","link":"https:\/\/www.hexnode.com\/mobile-device-management\/developers\/devices\/list-device-policies\/","title":{"rendered":"List Device Policies"},"content":{"rendered":"<div class=\"method-copy\">\n<div class=\"method-copy-padding\">\n<h2> List Device Policies <\/h2>\n<p>Returns the list of policies associated with a device.<\/p>\n<div class=\"table-responsive\">\n<table id=\"table_61516733\" width=\"100%\" class=\"table table-bordered\">\n<thead>\n<tr>\n<th width=\"15%\"> <strong>Parameters<\/strong> <\/th>\n<th width=\"15%\"> <strong>Type<\/strong> <\/th>\n<th width=\"15%\"> <strong>Description<\/strong> <\/th>\n<th width=\"10%\"> <strong>Default value<\/strong> <\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td> page <\/td>\n<td> Integer <\/td>\n<td> Optional <\/td>\n<td>1<\/td>\n<\/tr>\n<tr>\n<td> per_page <\/td>\n<td>Integer<\/td>\n<td>Optional<\/td>\n<td>100<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"method-example\">\n<div class=\"curl-text\">curl<\/div>\n<div class=\"code-curl code-div active-code\">\n<div class=\"method-example-part\">\nHTTP Request:<\/p>\n<pre class=\"lang:default decode:true\">GET https:\/\/<portal>.hexnodemdm.com\/api\/v1\/devices\/{DEVICE_ID}\/policies\/?page=1 \r\n<\/pre>\n<p>Shell Command:<\/p>\n<pre class=\"lang:default decode:true\">curl -H \"Authorization: <your API key>\" \"https:\/\/<portal>.hexnodemdm.com\/api\/v1\/devices\/{DEVICE_ID}\/policies\/?page=1\"\r\n<\/pre>\n<\/div>\n<\/div>\n<div class=\"code-curl code-div active-code\">\n<div class=\"method-example-part\">\nHTTP Response:<\/p>\n<pre class=\"lang:default decode:true\">{ \r\n\"count\":2, \r\n\"next\":null, \r\n\"previous\":null, \r\n\"results\":[  \r\n{   \r\n\"id\":4,   \r\n\"name\": \"ios policy\",  \r\n\"version\": 4  \r\n}, \r\n...\r\n] \r\n}\r\n<\/pre>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>List Device Policies Returns the list of policies associated with a device. Parameters Type Description Default value page Integer Optional 1 per_page Integer Optional 100 curl HTTP Request: GET https:\/\/.hexnodemdm.com\/api\/v1\/devices\/{DEVICE_ID}\/policies\/?page=1 Shell Command: curl -H &#8220;Authorization: &#8221; &#8220;https:\/\/.hexnodemdm.com\/api\/v1\/devices\/{DEVICE_ID}\/policies\/?page=1&#8221; HTTP Response: { &#8220;count&#8221;:2, &#8220;next&#8221;:null, &#8220;previous&#8221;:null, &#8220;results&#8221;:[ { &#8220;id&#8221;:4, &#8220;name&#8221;: &#8220;ios policy&#8221;, &#8220;version&#8221;: 4 }, &#8230; ] }<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":3644,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"class_list":["post-4050","page","type-page","status-publish","hentry"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.hexnode.com\/mobile-device-management\/developers\/wp-json\/wp\/v2\/pages\/4050","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hexnode.com\/mobile-device-management\/developers\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.hexnode.com\/mobile-device-management\/developers\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.hexnode.com\/mobile-device-management\/developers\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hexnode.com\/mobile-device-management\/developers\/wp-json\/wp\/v2\/comments?post=4050"}],"version-history":[{"count":6,"href":"https:\/\/www.hexnode.com\/mobile-device-management\/developers\/wp-json\/wp\/v2\/pages\/4050\/revisions"}],"predecessor-version":[{"id":4688,"href":"https:\/\/www.hexnode.com\/mobile-device-management\/developers\/wp-json\/wp\/v2\/pages\/4050\/revisions\/4688"}],"up":[{"embeddable":true,"href":"https:\/\/www.hexnode.com\/mobile-device-management\/developers\/wp-json\/wp\/v2\/pages\/3644"}],"wp:attachment":[{"href":"https:\/\/www.hexnode.com\/mobile-device-management\/developers\/wp-json\/wp\/v2\/media?parent=4050"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}