{"id":3470,"date":"2020-04-20T03:37:45","date_gmt":"2020-04-20T03:37:45","guid":{"rendered":"https:\/\/www.hexnode.com\/mobile-device-management\/api\/?page_id=3470"},"modified":"2022-04-04T04:31:07","modified_gmt":"2022-04-04T04:31:07","slug":"set-friendly-name","status":"publish","type":"page","link":"https:\/\/www.hexnode.com\/mobile-device-management\/developers\/actions\/set-friendly-name\/","title":{"rendered":"Set Friendly Name"},"content":{"rendered":"<div class=\"method-copy\">\n<div class=\"method-copy-padding\">\n<h2>Set Friendly Name<\/h2>\n<p>Rename or set a friendly name for the device from the MDM console.<\/p>\n<div class=\"table-responsive\">\n<table id=\"table_61516733\" class=\"table table-bordered\" width=\"100%\">\n<thead>\n<tr>\n<th width=\"15%\"><strong>Argument<\/strong><\/th>\n<th width=\"12%\"><strong>Type<\/strong><\/th>\n<th width=\"30%\"><strong>Description<\/strong><\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>set_collective_name<\/td>\n<td>Boolean type<\/td>\n<td><strong>Not mandatory.<\/strong><\/p>\n<p>If it is true, we use a single name and add a suffix.<\/td>\n<\/tr>\n<tr>\n<td>device_id_list<\/td>\n<td>Array<\/td>\n<td><strong>Mandatory.<\/strong><\/p>\n<p>It provides the list of device IDs.<\/td>\n<\/tr>\n<tr>\n<td>collective_name<\/td>\n<td>Character field<\/td>\n<td><strong>Mandatory when set_collective_name = true.<\/strong><\/p>\n<p>The same name is given for all the selected devices.<\/td>\n<\/tr>\n<tr>\n<td>friendly_name_list<\/td>\n<td>Array<\/td>\n<td><strong>Mandatory when set_collective_name = not true.<\/strong><\/p>\n<p>This is used to send the new friendly names.<\/td>\n<\/tr>\n<tr>\n<td>use_suffix<\/td>\n<td>Boolean type<\/td>\n<td><strong>Not mandatory<\/strong><\/p>\n<p>set_collective_name = true. Check whether suffix is needed.<\/td>\n<\/tr>\n<tr>\n<td>suffix<\/td>\n<td>Integer<\/td>\n<td><strong>Mandatory when use_suffix=true.<\/strong><\/p>\n<p>Starting number of the suffix.<\/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\">\n<p>HTTP Request:<\/p>\n<pre class=\"lang:default decode:true\">POST https:\/\/<portal>.hexnodemdm.com\/api\/v1\/actions\/save_friendly_name\/\r\nheaders:-\r\nAuthorization: <api key>\r\nContent-Type: application\/json\r\nSample Post Data:-\r\n[{\r\n\"set_collective_name\" : false,\r\n\"friendly_name_list\": [11,22],\r\n\"device_id_list\" : [1,2],\r\n\"use_suffix\" : true,\r\n\"suffix\":123\r\n}]\r\n<\/pre>\n<p>Shell Command:<\/p>\n<pre class=\"lang:default decode:true\"> curl  -H \"Authorization: <your API key>\" -H \"Content-Type: application\/json\" -d '{\"set_collective_name\" : false, \"friendly_name_list\":[11,22],\"device_id_list\":[1,2],\"use_suffix\":true,\"suffix\":123\r\n}'  https:\/\/<portal>.hexnodemdm.com\/api\/v1\/actions\/save_friendly_name\/\r\n<\/pre>\n<\/div>\n<\/div>\n<div class=\"code-curl code-div active-code\">\n<div class=\"method-example-part\">\n<p>HTTP Response:<\/p>\n<pre class=\"lang:default decode:true\">[\r\n    \"Friendly name of 2 device(s) modified!\"\r\n]\r\n<\/pre>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Set Friendly Name Rename or set a friendly name for the device from the MDM console. Argument Type Description set_collective_name Boolean type Not mandatory. If it is true, we use a single name and add a suffix. device_id_list Array Mandatory. It provides the list of device IDs. collective_name Character field Mandatory when set_collective_name = true. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":3698,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"class_list":["post-3470","page","type-page","status-publish","hentry"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.hexnode.com\/mobile-device-management\/developers\/wp-json\/wp\/v2\/pages\/3470","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=3470"}],"version-history":[{"count":7,"href":"https:\/\/www.hexnode.com\/mobile-device-management\/developers\/wp-json\/wp\/v2\/pages\/3470\/revisions"}],"predecessor-version":[{"id":4675,"href":"https:\/\/www.hexnode.com\/mobile-device-management\/developers\/wp-json\/wp\/v2\/pages\/3470\/revisions\/4675"}],"up":[{"embeddable":true,"href":"https:\/\/www.hexnode.com\/mobile-device-management\/developers\/wp-json\/wp\/v2\/pages\/3698"}],"wp:attachment":[{"href":"https:\/\/www.hexnode.com\/mobile-device-management\/developers\/wp-json\/wp\/v2\/media?parent=3470"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}