{"id":3519,"date":"2013-10-01T21:19:55","date_gmt":"2013-10-01T21:19:55","guid":{"rendered":"https:\/\/live-infoblox-blog.pantheonsite.io\/?p=3519"},"modified":"2020-05-06T10:31:38","modified_gmt":"2020-05-06T17:31:38","slug":"importing-users-into-netmri-via-the-api","status":"publish","type":"post","link":"https:\/\/www.infoblox.com\/blog\/community\/importing-users-into-netmri-via-the-api\/","title":{"rendered":"Importing users into NetMRI via the API"},"content":{"rendered":"<p>Here&#8217;s a perl script that shows how you can use the API to import users into NetMRI<\/p>\n<pre>use strict;\r\nuse warnings;\r\nuse NetMRI::API;\r\n# Comment this out if you are using HTTPS\r\n$ENV{'PERL_LWP_SSL_VERIFY_HOSTNAME'} = 0;\r\n# get the device id from the command# line as the first argument.\r\n# Connect to the NetMRI.\r\nmy $client = new NetMRI::API({\r\n     api_version =&gt;\r\n     '2.8',\r\n });\r\n ##################################\r\n #The \"users_list.data\" files needs to be in the following format\r\n #username,password,email,firstname,lastname\r\n #################################\r\n #open (READ_USERS, 'users_list.data');\r\n ##################################\r\n #Now we will read through each line in the file and assign them to variables\r\n ##################################\r\n my $broker = $client-&gt;broker-&gt;auth_user;\r\n while ( my $ask= ){\r\n   my @list = split(\/,\/, $ask);\r\n   my $list_username = $list[0];\r\n   my $list_password = $list[1];\r\n   my $list_email = $list[2];\r\n   my $firstname = $list[3];\r\n   my $lastname = $list[4];\r\n   $broker-&gt;\r\n   create(email =&gt;list_email,first_name =&gt;\r\n    $firstname,last_name =&gt;\r\n    $lastname,password_secure =&gt;\r\n    $list_password,user_name =&gt;\r\n    $list_username);\r\n }\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Here&#8217;s a perl script that shows how you can use the API to import users into NetMRI use strict; use warnings; use NetMRI::API; # Comment this out if you are using HTTPS $ENV{&#8216;PERL_LWP_SSL_VERIFY_HOSTNAME&#8217;} = 0; # get the device id from the command# line as the first argument. # Connect to the NetMRI. my $client [&hellip;]<\/p>\n","protected":false},"author":260,"featured_media":2420,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"_genesis_hide_title":false,"_genesis_hide_breadcrumbs":false,"_genesis_hide_singular_image":false,"_genesis_hide_footer_widgets":false,"_genesis_custom_body_class":"","_genesis_custom_post_class":"","_genesis_layout":"","footnotes":""},"categories":[3],"tags":[16,15],"class_list":{"0":"post-3519","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-community","8":"tag-infoblox","9":"tag-security","10":"entry"},"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.3 (Yoast SEO v27.3) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Importing users into NetMRI via the API<\/title>\n<meta name=\"description\" content=\"Here&#039;s a perl script that shows how you can use the API to import users into NetMRI\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.infoblox.com\/blog\/community\/importing-users-into-netmri-via-the-api\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Importing users into NetMRI via the API\" \/>\n<meta property=\"og:description\" content=\"Here&#039;s a perl script that shows how you can use the API to import users into NetMRI\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.infoblox.com\/blog\/community\/importing-users-into-netmri-via-the-api\/\" \/>\n<meta property=\"og:site_name\" content=\"Infoblox Blog\" \/>\n<meta property=\"article:published_time\" content=\"2013-10-01T21:19:55+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-05-06T17:31:38+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.infoblox.com\/blog\/wp-content\/uploads\/spotlightonsecuritycommunity.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1024\" \/>\n\t<meta property=\"og:image:height\" content=\"512\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Sif Baksh\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Sif Baksh\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.infoblox.com\\\/blog\\\/community\\\/importing-users-into-netmri-via-the-api\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.infoblox.com\\\/blog\\\/community\\\/importing-users-into-netmri-via-the-api\\\/\"},\"author\":{\"name\":\"Sif Baksh\",\"@id\":\"https:\\\/\\\/www.infoblox.com\\\/blog\\\/#\\\/schema\\\/person\\\/d78ba19c60e3345e0b057ecb0f990108\"},\"headline\":\"Importing users into NetMRI via the API\",\"datePublished\":\"2013-10-01T21:19:55+00:00\",\"dateModified\":\"2020-05-06T17:31:38+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.infoblox.com\\\/blog\\\/community\\\/importing-users-into-netmri-via-the-api\\\/\"},\"wordCount\":25,\"publisher\":{\"@id\":\"https:\\\/\\\/www.infoblox.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.infoblox.com\\\/blog\\\/community\\\/importing-users-into-netmri-via-the-api\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.infoblox.com\\\/blog\\\/wp-content\\\/uploads\\\/spotlightonsecuritycommunity.jpg\",\"keywords\":[\"Infoblox\",\"Security\"],\"articleSection\":[\"Community\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.infoblox.com\\\/blog\\\/community\\\/importing-users-into-netmri-via-the-api\\\/\",\"url\":\"https:\\\/\\\/www.infoblox.com\\\/blog\\\/community\\\/importing-users-into-netmri-via-the-api\\\/\",\"name\":\"Importing users into NetMRI via the API\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.infoblox.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.infoblox.com\\\/blog\\\/community\\\/importing-users-into-netmri-via-the-api\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.infoblox.com\\\/blog\\\/community\\\/importing-users-into-netmri-via-the-api\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.infoblox.com\\\/blog\\\/wp-content\\\/uploads\\\/spotlightonsecuritycommunity.jpg\",\"datePublished\":\"2013-10-01T21:19:55+00:00\",\"dateModified\":\"2020-05-06T17:31:38+00:00\",\"description\":\"Here's a perl script that shows how you can use the API to import users into NetMRI\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.infoblox.com\\\/blog\\\/community\\\/importing-users-into-netmri-via-the-api\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.infoblox.com\\\/blog\\\/community\\\/importing-users-into-netmri-via-the-api\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.infoblox.com\\\/blog\\\/community\\\/importing-users-into-netmri-via-the-api\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.infoblox.com\\\/blog\\\/wp-content\\\/uploads\\\/spotlightonsecuritycommunity.jpg\",\"contentUrl\":\"https:\\\/\\\/www.infoblox.com\\\/blog\\\/wp-content\\\/uploads\\\/spotlightonsecuritycommunity.jpg\",\"width\":1024,\"height\":512},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.infoblox.com\\\/blog\\\/community\\\/importing-users-into-netmri-via-the-api\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.infoblox.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Community\",\"item\":\"https:\\\/\\\/www.infoblox.com\\\/blog\\\/category\\\/community\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Importing users into NetMRI via the API\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.infoblox.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.infoblox.com\\\/blog\\\/\",\"name\":\"infoblox.com\\\/blog\\\/\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.infoblox.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.infoblox.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.infoblox.com\\\/blog\\\/#organization\",\"name\":\"Infoblox\",\"url\":\"https:\\\/\\\/www.infoblox.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.infoblox.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.infoblox.com\\\/blog\\\/wp-content\\\/uploads\\\/infoblox-logo-2.svg\",\"contentUrl\":\"https:\\\/\\\/www.infoblox.com\\\/blog\\\/wp-content\\\/uploads\\\/infoblox-logo-2.svg\",\"width\":137,\"height\":30,\"caption\":\"Infoblox\"},\"image\":{\"@id\":\"https:\\\/\\\/www.infoblox.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.infoblox.com\\\/blog\\\/#\\\/schema\\\/person\\\/d78ba19c60e3345e0b057ecb0f990108\",\"name\":\"Sif Baksh\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/blogs.infoblox.com\\\/wp-content\\\/uploads\\\/avatar_user_260_1582930725-96x96.jpg\",\"url\":\"https:\\\/\\\/blogs.infoblox.com\\\/wp-content\\\/uploads\\\/avatar_user_260_1582930725-96x96.jpg\",\"contentUrl\":\"https:\\\/\\\/blogs.infoblox.com\\\/wp-content\\\/uploads\\\/avatar_user_260_1582930725-96x96.jpg\",\"caption\":\"Sif Baksh\"},\"description\":\"Sif is a Principal Sales Engineer at Infoblox where he provides technical expertise regarding Infoblox solutions with a focus on Network Automation and Cybersecurity. He has been with Infoblox for over 7 years, starting in the Professional Services org where he performed NetMRI deployments at many of the largest companies in the world. Outside of work, Sif can be found at the local hackerspace where he volunteers as a leading cybersecurity educator. Online he can be found @sifbaksh running the regex daily channel.\",\"sameAs\":[\"https:\\\/\\\/sifbaksh.com\\\/\"],\"url\":\"https:\\\/\\\/www.infoblox.com\\\/blog\\\/author\\\/sif-baksh\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Importing users into NetMRI via the API","description":"Here's a perl script that shows how you can use the API to import users into NetMRI","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.infoblox.com\/blog\/community\/importing-users-into-netmri-via-the-api\/","og_locale":"en_US","og_type":"article","og_title":"Importing users into NetMRI via the API","og_description":"Here's a perl script that shows how you can use the API to import users into NetMRI","og_url":"https:\/\/www.infoblox.com\/blog\/community\/importing-users-into-netmri-via-the-api\/","og_site_name":"Infoblox Blog","article_published_time":"2013-10-01T21:19:55+00:00","article_modified_time":"2020-05-06T17:31:38+00:00","og_image":[{"width":1024,"height":512,"url":"https:\/\/www.infoblox.com\/blog\/wp-content\/uploads\/spotlightonsecuritycommunity.jpg","type":"image\/jpeg"}],"author":"Sif Baksh","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Sif Baksh","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.infoblox.com\/blog\/community\/importing-users-into-netmri-via-the-api\/#article","isPartOf":{"@id":"https:\/\/www.infoblox.com\/blog\/community\/importing-users-into-netmri-via-the-api\/"},"author":{"name":"Sif Baksh","@id":"https:\/\/www.infoblox.com\/blog\/#\/schema\/person\/d78ba19c60e3345e0b057ecb0f990108"},"headline":"Importing users into NetMRI via the API","datePublished":"2013-10-01T21:19:55+00:00","dateModified":"2020-05-06T17:31:38+00:00","mainEntityOfPage":{"@id":"https:\/\/www.infoblox.com\/blog\/community\/importing-users-into-netmri-via-the-api\/"},"wordCount":25,"publisher":{"@id":"https:\/\/www.infoblox.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.infoblox.com\/blog\/community\/importing-users-into-netmri-via-the-api\/#primaryimage"},"thumbnailUrl":"https:\/\/www.infoblox.com\/blog\/wp-content\/uploads\/spotlightonsecuritycommunity.jpg","keywords":["Infoblox","Security"],"articleSection":["Community"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.infoblox.com\/blog\/community\/importing-users-into-netmri-via-the-api\/","url":"https:\/\/www.infoblox.com\/blog\/community\/importing-users-into-netmri-via-the-api\/","name":"Importing users into NetMRI via the API","isPartOf":{"@id":"https:\/\/www.infoblox.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.infoblox.com\/blog\/community\/importing-users-into-netmri-via-the-api\/#primaryimage"},"image":{"@id":"https:\/\/www.infoblox.com\/blog\/community\/importing-users-into-netmri-via-the-api\/#primaryimage"},"thumbnailUrl":"https:\/\/www.infoblox.com\/blog\/wp-content\/uploads\/spotlightonsecuritycommunity.jpg","datePublished":"2013-10-01T21:19:55+00:00","dateModified":"2020-05-06T17:31:38+00:00","description":"Here's a perl script that shows how you can use the API to import users into NetMRI","breadcrumb":{"@id":"https:\/\/www.infoblox.com\/blog\/community\/importing-users-into-netmri-via-the-api\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.infoblox.com\/blog\/community\/importing-users-into-netmri-via-the-api\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.infoblox.com\/blog\/community\/importing-users-into-netmri-via-the-api\/#primaryimage","url":"https:\/\/www.infoblox.com\/blog\/wp-content\/uploads\/spotlightonsecuritycommunity.jpg","contentUrl":"https:\/\/www.infoblox.com\/blog\/wp-content\/uploads\/spotlightonsecuritycommunity.jpg","width":1024,"height":512},{"@type":"BreadcrumbList","@id":"https:\/\/www.infoblox.com\/blog\/community\/importing-users-into-netmri-via-the-api\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.infoblox.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Community","item":"https:\/\/www.infoblox.com\/blog\/category\/community\/"},{"@type":"ListItem","position":3,"name":"Importing users into NetMRI via the API"}]},{"@type":"WebSite","@id":"https:\/\/www.infoblox.com\/blog\/#website","url":"https:\/\/www.infoblox.com\/blog\/","name":"infoblox.com\/blog\/","description":"","publisher":{"@id":"https:\/\/www.infoblox.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.infoblox.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.infoblox.com\/blog\/#organization","name":"Infoblox","url":"https:\/\/www.infoblox.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.infoblox.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.infoblox.com\/blog\/wp-content\/uploads\/infoblox-logo-2.svg","contentUrl":"https:\/\/www.infoblox.com\/blog\/wp-content\/uploads\/infoblox-logo-2.svg","width":137,"height":30,"caption":"Infoblox"},"image":{"@id":"https:\/\/www.infoblox.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.infoblox.com\/blog\/#\/schema\/person\/d78ba19c60e3345e0b057ecb0f990108","name":"Sif Baksh","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/blogs.infoblox.com\/wp-content\/uploads\/avatar_user_260_1582930725-96x96.jpg","url":"https:\/\/blogs.infoblox.com\/wp-content\/uploads\/avatar_user_260_1582930725-96x96.jpg","contentUrl":"https:\/\/blogs.infoblox.com\/wp-content\/uploads\/avatar_user_260_1582930725-96x96.jpg","caption":"Sif Baksh"},"description":"Sif is a Principal Sales Engineer at Infoblox where he provides technical expertise regarding Infoblox solutions with a focus on Network Automation and Cybersecurity. He has been with Infoblox for over 7 years, starting in the Professional Services org where he performed NetMRI deployments at many of the largest companies in the world. Outside of work, Sif can be found at the local hackerspace where he volunteers as a leading cybersecurity educator. Online he can be found @sifbaksh running the regex daily channel.","sameAs":["https:\/\/sifbaksh.com\/"],"url":"https:\/\/www.infoblox.com\/blog\/author\/sif-baksh\/"}]}},"_links":{"self":[{"href":"https:\/\/www.infoblox.com\/blog\/wp-json\/wp\/v2\/posts\/3519","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.infoblox.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.infoblox.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.infoblox.com\/blog\/wp-json\/wp\/v2\/users\/260"}],"replies":[{"embeddable":true,"href":"https:\/\/www.infoblox.com\/blog\/wp-json\/wp\/v2\/comments?post=3519"}],"version-history":[{"count":2,"href":"https:\/\/www.infoblox.com\/blog\/wp-json\/wp\/v2\/posts\/3519\/revisions"}],"predecessor-version":[{"id":3521,"href":"https:\/\/www.infoblox.com\/blog\/wp-json\/wp\/v2\/posts\/3519\/revisions\/3521"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.infoblox.com\/blog\/wp-json\/wp\/v2\/media\/2420"}],"wp:attachment":[{"href":"https:\/\/www.infoblox.com\/blog\/wp-json\/wp\/v2\/media?parent=3519"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.infoblox.com\/blog\/wp-json\/wp\/v2\/categories?post=3519"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.infoblox.com\/blog\/wp-json\/wp\/v2\/tags?post=3519"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}