{"id":6890,"date":"2021-08-25T14:02:35","date_gmt":"2021-08-25T21:02:35","guid":{"rendered":"https:\/\/blogs.infoblox.com\/?p=6890"},"modified":"2021-08-25T14:02:35","modified_gmt":"2021-08-25T21:02:35","slug":"turbocharge-you-infoblox-api-calls-part-3","status":"publish","type":"post","link":"https:\/\/www.infoblox.com\/blog\/community\/turbocharge-you-infoblox-api-calls-part-3\/","title":{"rendered":"Turbocharge you Infoblox API calls (Part 3)"},"content":{"rendered":"<p class=\"g-lead\">In part 3 of Turbocharge your Infoblox RESTful API calls series, we discuss how to batch WAPI requests using the request body to speed up our automation scripts.<\/p>\n<h3>OVERVIEW<\/h3>\n<p>In this third article of the\u00a0<strong>Turbocharge your Infoblox RESTful API calls<\/strong>\u00a0series, we discuss synchronous programming and its drawbacks. In addition, we show how to leverage the Infoblox WAPI request object to effectively batch a large number of &#8220;requests&#8221; into a single WAPI call to improve performance. First, we should discuss what synchronous programming is, why it&#8217;s good, and what are its weaknesses.<\/p>\n<p>The code used in development of this article series is accessible at\u00a0<a href=\"https:\/\/github.com\/ddiguru\/turbocharge_infoblox_api\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/github.com\/ddiguru\/turbocharge_infoblox_api<\/a><\/p>\n<h4>Synchronous programming<\/h4>\n<blockquote><p>Synchronous code: Scripts are loaded and executed sequentially along with the other web page components. Each time a function is called, the program execution waits until the function is returned before executing the next line of code.<\/p><\/blockquote>\n<p>Pros of Synchronous programs<\/p>\n<ul>\n<li>easy to write, execute, and debug<\/li>\n<li>serial or step-wise execution<\/li>\n<li>simpler business logic<\/li>\n<li>predictable<\/li>\n<\/ul>\n<p>Cons of Synchronous programs<\/p>\n<ul>\n<li>blocking nature &#8211; a function must complete before allowing the next task to begin<\/li>\n<li>slower performing<\/li>\n<\/ul>\n<p>In the first article, we created and used a simple synchronous script which creates networks &#8211; 1,024 of them to be exact. See the code listing for\u00a0<a href=\"https:\/\/github.com\/ddiguru\/turbocharge_infoblox_api\/blob\/main\/wapi-network.py\" target=\"_blank\" rel=\"noopener noreferrer\">wapi-network.py<\/a>. If we were to graphically depict what was going on in our script, it would look something like the following:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-6891\" src=\"https:\/\/blogs.infoblox.com\/wp-content\/uploads\/ddi-guru-turbo-3-image-1.jpg\" alt=\"\" width=\"639\" height=\"258\" srcset=\"https:\/\/www.infoblox.com\/blog\/wp-content\/uploads\/ddi-guru-turbo-3-image-1.jpg 639w, https:\/\/www.infoblox.com\/blog\/wp-content\/uploads\/ddi-guru-turbo-3-image-1-300x121.jpg 300w\" sizes=\"auto, (max-width: 639px) 100vw, 639px\" \/><\/p>\n<p>Each numbered request represents the creation of an IPv4 Network by issuing a POST call to the WAPI network object. There is some I\/O wait to this operation, as the server receives and processes the request. The script blocks and does not start to add the next IPv4 Network until it has received the success or failure response from the server. Once received, the script continues to process the next network and so on.<\/p>\n<div class=\"notices blue\">\n<p>NOTE: depending on how exceptions are handled, if the server has a problem adding a network, it will return an exception notification. If our script cannot handle the exception, it will exit. Exception handling is outside the scope of the article &#8211; assume that the Infoblox Grid database either has no data or is cleared prior to executing the script, and will never experience an exception.<\/p>\n<\/div>\n<h3>WAPI Request Object<\/h3>\n<p>How can we make our script run faster?<\/p>\n<p>The Infoblox REST API has a special object, called the\u00a0<em>request<\/em>\u00a0object, that can be used to issue several &#8220;requests&#8221; in the body of a single WAPI POST call. We will essentially batch process the creation of 1,024 IPv4 Networks in a single WAPI POST request. The code from our original synchronous script is shown below:<\/p>\n<pre><code class=\"language-python hljs\">    <span class=\"hljs-comment\"># create IPv4 Network object(s) one at a time<\/span>\r\n    <span class=\"hljs-keyword\">for<\/span> network <span class=\"hljs-keyword\">in<\/span> networks:\r\n        payload = <span class=\"hljs-built_in\">dict<\/span>(network=network, comment=<span class=\"hljs-string\">'test-network'<\/span>)\r\n        s.post(<span class=\"hljs-string\">f'<span class=\"hljs-subst\">{url}<\/span>\/network'<\/span>, data=json.dumps(payload), verify=<span class=\"hljs-literal\">False<\/span>)<\/code><\/pre>\n<p>To use the WAPI\u00a0<em>request<\/em>\u00a0object, we change the business logic of our script to the following:<\/p>\n<pre><code class=\"language-python hljs\">    <span class=\"hljs-comment\"># add networks using the requests object<\/span>\r\n    network_requests = []\r\n    <span class=\"hljs-keyword\">for<\/span> network <span class=\"hljs-keyword\">in<\/span> networks:\r\n        network_object = <span class=\"hljs-built_in\">dict<\/span>(\r\n            method=<span class=\"hljs-string\">\"POST\"<\/span>,\r\n            <span class=\"hljs-built_in\">object<\/span>=<span class=\"hljs-string\">\"network\"<\/span>,\r\n            data=<span class=\"hljs-built_in\">dict<\/span>(network=network, comment=<span class=\"hljs-string\">'test-network'<\/span>)\r\n        )\r\n        network_requests.append(network_object)\r\n\r\n    s.post(<span class=\"hljs-string\">f'<span class=\"hljs-subst\">{url}<\/span>\/request'<\/span>, data=json.dumps(network_requests), verify=<span class=\"hljs-literal\">False<\/span>)<\/code><\/pre>\n<p>Instead of creating a network object one at a time, we build up a list\u00a0<strong>network_requests<\/strong>\u00a0consisting of WAPI\u00a0<strong>network<\/strong>\u00a0objects that we are calling a\u00a0<strong>network_object<\/strong>. Once all 1,024 networks have been added to the list, the\u00a0<strong>network_requests<\/strong>\u00a0list is passed as data to a single POST request call to the WAPI\u00a0<em>request<\/em>\u00a0object. See the full code for the\u00a0<a href=\"https:\/\/github.com\/ddiguru\/turbocharge_infoblox_api\/blob\/main\/wapi-request.py\" target=\"_blank\" rel=\"noopener noreferrer\">wapi-request.py<\/a>\u00a0script. Again, if we were to graphically depict batch processing using the WAPI\u00a0<em>request<\/em>\u00a0object, it would look like the following:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-6892\" src=\"https:\/\/blogs.infoblox.com\/wp-content\/uploads\/ddi-guru-turbo-3-image-2.jpg\" alt=\"\" width=\"639\" height=\"331\" srcset=\"https:\/\/www.infoblox.com\/blog\/wp-content\/uploads\/ddi-guru-turbo-3-image-2.jpg 639w, https:\/\/www.infoblox.com\/blog\/wp-content\/uploads\/ddi-guru-turbo-3-image-2-300x155.jpg 300w\" sizes=\"auto, (max-width: 639px) 100vw, 639px\" \/><\/p>\n<p>The figure above shows a single request for all the networks.<\/p>\n<p>To test this we ran our wapi-network.py script against an empty Infoblox Grid database three times to establish our baseline. We then ran the wapi-request.py scrpt three times and compared the duration times for script execution. The results were astounding. The wapi-request.py script was almost 70% faster!! The table below summarizes our results:<\/p>\n<div class=\"simple-responsive-table\">\n<div>\n<table>\n<thead>\n<tr>\n<th>Test<\/th>\n<th>Pass #1<\/th>\n<th>Pass #2<\/th>\n<th>Pass #3<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>wapi-network.py<\/td>\n<td>33.95<\/td>\n<td>33.16<\/td>\n<td>33.58<\/td>\n<\/tr>\n<tr>\n<td>wapi-request.py<\/td>\n<td>11.01<\/td>\n<td>11.15<\/td>\n<td>10.72<\/td>\n<\/tr>\n<tr>\n<td><strong>% improvement<\/strong><\/td>\n<td><strong>67.57%<\/strong><\/td>\n<td><strong>66.38%<\/strong><\/td>\n<td><strong>68.08%<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>While, the performance of using this method was significant, performance is not everything. Recall, we&#8217;re loading this data on an empty grid &#8211; we&#8217;re not likely to see any exceptions. But what if we did have an exception? Would the entire script fail? OR partially fail? Could we ascertain which record or at which point in the script the failure occurred? Using the WAPI\u00a0<em>request<\/em>\u00a0module to bulk load data is far more complicated than the synchronous code of our first script. Therefore, performance comes with a price. The WAPI\u00a0<em>request<\/em>\u00a0object is best for the following:<\/p>\n<ul>\n<li>raw speed<\/li>\n<li>predictable data insert or creation i.e., inserting data into a clean database or loading zone data into a newly created zone<\/li>\n<li>creating &#8220;transactions&#8221; involving read(s) and update(s)<\/li>\n<li>insert(s) and update(s) commonly referred to as upserts<\/li>\n<\/ul>\n<p><strong>Pro Tip:<\/strong>\u00a0While we&#8217;re focusing on the raw performance gain of the Infoblox WAPI Request Object &#8211; please know that the WAPI Request object can be leveraged to do much more than simple insert action(s). The Infoblox Request object can be used to build the concept of a transaction where you fetch object(s), make update(s), followed by persisting the changes. The word &#8220;transaction&#8221; is another term for making atomic changes, updates etc. So, please do explore the power of the WAPI Request object type.<\/p>\n<p>If you decide to leverage the pure speed of the WAPI\u00a0<em>request<\/em>\u00a0object in your scripts, be prepared to write more complicated exception handling routines to handle data errors. In part 4 of our\u00a0<strong>Turbocharge your Infoblox RESTful API calls<\/strong>\u00a0series, we&#8217;ll look at how asynchronous programming can be used to improve our automation scripts using the Infoblox WAPI.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In part 3 of Turbocharge your Infoblox RESTful API calls series, we discuss how to batch WAPI requests using the request body to speed up our automation scripts. OVERVIEW In this third article of the\u00a0Turbocharge your Infoblox RESTful API calls\u00a0series, we discuss synchronous programming and its drawbacks. In addition, we show how to leverage the [&hellip;]<\/p>\n","protected":false},"author":358,"featured_media":6893,"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,131,560,60],"class_list":{"0":"post-6890","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-community","8":"tag-infoblox","9":"tag-api","10":"tag-restful-api-calls","11":"tag-wapi","12":"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>Turbocharge you Infoblox API calls (Part 3)<\/title>\n<meta name=\"description\" content=\"Turbocharge you Infoblox API calls (Part 3). In this third article of the Turbocharge your Infoblox RESTful API calls series, we discuss synchronous programming and its drawbacks. In addition, we show how to leverage the Infoblox WAPI request object to effectively batch a large number of &quot;requests&quot; into a single WAPI call to improve performance. First, we should discuss what synchronous programming is, why it&#039;s good, and what are its weaknesses.\" \/>\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\/turbocharge-you-infoblox-api-calls-part-3\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Turbocharge you Infoblox API calls (Part 3)\" \/>\n<meta property=\"og:description\" content=\"Turbocharge you Infoblox API calls (Part 3). In this third article of the Turbocharge your Infoblox RESTful API calls series, we discuss synchronous programming and its drawbacks. In addition, we show how to leverage the Infoblox WAPI request object to effectively batch a large number of &quot;requests&quot; into a single WAPI call to improve performance. First, we should discuss what synchronous programming is, why it&#039;s good, and what are its weaknesses.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.infoblox.com\/blog\/community\/turbocharge-you-infoblox-api-calls-part-3\/\" \/>\n<meta property=\"og:site_name\" content=\"Infoblox Blog\" \/>\n<meta property=\"article:published_time\" content=\"2021-08-25T21:02:35+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.infoblox.com\/blog\/wp-content\/uploads\/ddi-guru-turbo-3-graphic.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"600\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Patrick Piper\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Patrick Piper\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.infoblox.com\\\/blog\\\/community\\\/turbocharge-you-infoblox-api-calls-part-3\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.infoblox.com\\\/blog\\\/community\\\/turbocharge-you-infoblox-api-calls-part-3\\\/\"},\"author\":{\"name\":\"Patrick Piper\",\"@id\":\"https:\\\/\\\/www.infoblox.com\\\/blog\\\/#\\\/schema\\\/person\\\/ac7cfb5c14c9216ae7cb53acfe37c1db\"},\"headline\":\"Turbocharge you Infoblox API calls (Part 3)\",\"datePublished\":\"2021-08-25T21:02:35+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.infoblox.com\\\/blog\\\/community\\\/turbocharge-you-infoblox-api-calls-part-3\\\/\"},\"wordCount\":916,\"publisher\":{\"@id\":\"https:\\\/\\\/www.infoblox.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.infoblox.com\\\/blog\\\/community\\\/turbocharge-you-infoblox-api-calls-part-3\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.infoblox.com\\\/blog\\\/wp-content\\\/uploads\\\/ddi-guru-turbo-3-graphic.jpg\",\"keywords\":[\"Infoblox\",\"API\",\"restful api calls\",\"WAPI\"],\"articleSection\":[\"Community\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.infoblox.com\\\/blog\\\/community\\\/turbocharge-you-infoblox-api-calls-part-3\\\/\",\"url\":\"https:\\\/\\\/www.infoblox.com\\\/blog\\\/community\\\/turbocharge-you-infoblox-api-calls-part-3\\\/\",\"name\":\"Turbocharge you Infoblox API calls (Part 3)\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.infoblox.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.infoblox.com\\\/blog\\\/community\\\/turbocharge-you-infoblox-api-calls-part-3\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.infoblox.com\\\/blog\\\/community\\\/turbocharge-you-infoblox-api-calls-part-3\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.infoblox.com\\\/blog\\\/wp-content\\\/uploads\\\/ddi-guru-turbo-3-graphic.jpg\",\"datePublished\":\"2021-08-25T21:02:35+00:00\",\"description\":\"Turbocharge you Infoblox API calls (Part 3). In this third article of the Turbocharge your Infoblox RESTful API calls series, we discuss synchronous programming and its drawbacks. In addition, we show how to leverage the Infoblox WAPI request object to effectively batch a large number of \\\"requests\\\" into a single WAPI call to improve performance. First, we should discuss what synchronous programming is, why it's good, and what are its weaknesses.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.infoblox.com\\\/blog\\\/community\\\/turbocharge-you-infoblox-api-calls-part-3\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.infoblox.com\\\/blog\\\/community\\\/turbocharge-you-infoblox-api-calls-part-3\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.infoblox.com\\\/blog\\\/community\\\/turbocharge-you-infoblox-api-calls-part-3\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.infoblox.com\\\/blog\\\/wp-content\\\/uploads\\\/ddi-guru-turbo-3-graphic.jpg\",\"contentUrl\":\"https:\\\/\\\/www.infoblox.com\\\/blog\\\/wp-content\\\/uploads\\\/ddi-guru-turbo-3-graphic.jpg\",\"width\":1200,\"height\":600},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.infoblox.com\\\/blog\\\/community\\\/turbocharge-you-infoblox-api-calls-part-3\\\/#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\":\"Turbocharge you Infoblox API calls (Part 3)\"}]},{\"@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\\\/ac7cfb5c14c9216ae7cb53acfe37c1db\",\"name\":\"Patrick Piper\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/blogs.infoblox.com\\\/wp-content\\\/uploads\\\/avatar_user_358_1628788417-96x96.jpg\",\"url\":\"https:\\\/\\\/blogs.infoblox.com\\\/wp-content\\\/uploads\\\/avatar_user_358_1628788417-96x96.jpg\",\"contentUrl\":\"https:\\\/\\\/blogs.infoblox.com\\\/wp-content\\\/uploads\\\/avatar_user_358_1628788417-96x96.jpg\",\"caption\":\"Patrick Piper\"},\"description\":\"Patrick has over 24 years of experience in IT networking, with an emphasis on IP Address Management, DNS, and DHCP technologies. He graduated from N.C. State University with a BA in Business Management and was an All-American in Cross Country and Track. During his early work years following graduation, he took his running to the National level at the marathon distance, by qualifying for the 1994 Olympic Trials in just my first Marathon. Today, he appliesy the same hard work ethic and dedication that helped him be successful as an athlete to his IT consultancy. He has followed a well-planned job progression, starting as a systems engineer working with network operating systems and routing technologies. He advanced into consulting, where he learned how to effectively communicate and interact with technical and non-technical personnel on various large-scale IP services projects. In 1995, he founded Netlinx, Inc. originally as a systems integration firm focused on small business networking. Over the last 20 years his focus and emphasis has been on providing professional consulting and development services in the DDI space to large Enterprise firms. In 2012, he joined Wells Fargo &amp; Co. as the technical lead for the DDI Engineering team where he leads design, architecture, and engineering tasks as part of a large DDI reengineering project. In Aug. of 2014, he re-branded Netlinx, Inc. to DDI Guru, LLC, as a top-provider of DDI Engineering, Consulting, and Automation Services company.\",\"url\":\"https:\\\/\\\/www.infoblox.com\\\/blog\\\/author\\\/patrick-piper\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Turbocharge you Infoblox API calls (Part 3)","description":"Turbocharge you Infoblox API calls (Part 3). In this third article of the Turbocharge your Infoblox RESTful API calls series, we discuss synchronous programming and its drawbacks. In addition, we show how to leverage the Infoblox WAPI request object to effectively batch a large number of \"requests\" into a single WAPI call to improve performance. First, we should discuss what synchronous programming is, why it's good, and what are its weaknesses.","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\/turbocharge-you-infoblox-api-calls-part-3\/","og_locale":"en_US","og_type":"article","og_title":"Turbocharge you Infoblox API calls (Part 3)","og_description":"Turbocharge you Infoblox API calls (Part 3). In this third article of the Turbocharge your Infoblox RESTful API calls series, we discuss synchronous programming and its drawbacks. In addition, we show how to leverage the Infoblox WAPI request object to effectively batch a large number of \"requests\" into a single WAPI call to improve performance. First, we should discuss what synchronous programming is, why it's good, and what are its weaknesses.","og_url":"https:\/\/www.infoblox.com\/blog\/community\/turbocharge-you-infoblox-api-calls-part-3\/","og_site_name":"Infoblox Blog","article_published_time":"2021-08-25T21:02:35+00:00","og_image":[{"width":1200,"height":600,"url":"https:\/\/www.infoblox.com\/blog\/wp-content\/uploads\/ddi-guru-turbo-3-graphic.jpg","type":"image\/jpeg"}],"author":"Patrick Piper","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Patrick Piper","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.infoblox.com\/blog\/community\/turbocharge-you-infoblox-api-calls-part-3\/#article","isPartOf":{"@id":"https:\/\/www.infoblox.com\/blog\/community\/turbocharge-you-infoblox-api-calls-part-3\/"},"author":{"name":"Patrick Piper","@id":"https:\/\/www.infoblox.com\/blog\/#\/schema\/person\/ac7cfb5c14c9216ae7cb53acfe37c1db"},"headline":"Turbocharge you Infoblox API calls (Part 3)","datePublished":"2021-08-25T21:02:35+00:00","mainEntityOfPage":{"@id":"https:\/\/www.infoblox.com\/blog\/community\/turbocharge-you-infoblox-api-calls-part-3\/"},"wordCount":916,"publisher":{"@id":"https:\/\/www.infoblox.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.infoblox.com\/blog\/community\/turbocharge-you-infoblox-api-calls-part-3\/#primaryimage"},"thumbnailUrl":"https:\/\/www.infoblox.com\/blog\/wp-content\/uploads\/ddi-guru-turbo-3-graphic.jpg","keywords":["Infoblox","API","restful api calls","WAPI"],"articleSection":["Community"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.infoblox.com\/blog\/community\/turbocharge-you-infoblox-api-calls-part-3\/","url":"https:\/\/www.infoblox.com\/blog\/community\/turbocharge-you-infoblox-api-calls-part-3\/","name":"Turbocharge you Infoblox API calls (Part 3)","isPartOf":{"@id":"https:\/\/www.infoblox.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.infoblox.com\/blog\/community\/turbocharge-you-infoblox-api-calls-part-3\/#primaryimage"},"image":{"@id":"https:\/\/www.infoblox.com\/blog\/community\/turbocharge-you-infoblox-api-calls-part-3\/#primaryimage"},"thumbnailUrl":"https:\/\/www.infoblox.com\/blog\/wp-content\/uploads\/ddi-guru-turbo-3-graphic.jpg","datePublished":"2021-08-25T21:02:35+00:00","description":"Turbocharge you Infoblox API calls (Part 3). In this third article of the Turbocharge your Infoblox RESTful API calls series, we discuss synchronous programming and its drawbacks. In addition, we show how to leverage the Infoblox WAPI request object to effectively batch a large number of \"requests\" into a single WAPI call to improve performance. First, we should discuss what synchronous programming is, why it's good, and what are its weaknesses.","breadcrumb":{"@id":"https:\/\/www.infoblox.com\/blog\/community\/turbocharge-you-infoblox-api-calls-part-3\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.infoblox.com\/blog\/community\/turbocharge-you-infoblox-api-calls-part-3\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.infoblox.com\/blog\/community\/turbocharge-you-infoblox-api-calls-part-3\/#primaryimage","url":"https:\/\/www.infoblox.com\/blog\/wp-content\/uploads\/ddi-guru-turbo-3-graphic.jpg","contentUrl":"https:\/\/www.infoblox.com\/blog\/wp-content\/uploads\/ddi-guru-turbo-3-graphic.jpg","width":1200,"height":600},{"@type":"BreadcrumbList","@id":"https:\/\/www.infoblox.com\/blog\/community\/turbocharge-you-infoblox-api-calls-part-3\/#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":"Turbocharge you Infoblox API calls (Part 3)"}]},{"@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\/ac7cfb5c14c9216ae7cb53acfe37c1db","name":"Patrick Piper","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/blogs.infoblox.com\/wp-content\/uploads\/avatar_user_358_1628788417-96x96.jpg","url":"https:\/\/blogs.infoblox.com\/wp-content\/uploads\/avatar_user_358_1628788417-96x96.jpg","contentUrl":"https:\/\/blogs.infoblox.com\/wp-content\/uploads\/avatar_user_358_1628788417-96x96.jpg","caption":"Patrick Piper"},"description":"Patrick has over 24 years of experience in IT networking, with an emphasis on IP Address Management, DNS, and DHCP technologies. He graduated from N.C. State University with a BA in Business Management and was an All-American in Cross Country and Track. During his early work years following graduation, he took his running to the National level at the marathon distance, by qualifying for the 1994 Olympic Trials in just my first Marathon. Today, he appliesy the same hard work ethic and dedication that helped him be successful as an athlete to his IT consultancy. He has followed a well-planned job progression, starting as a systems engineer working with network operating systems and routing technologies. He advanced into consulting, where he learned how to effectively communicate and interact with technical and non-technical personnel on various large-scale IP services projects. In 1995, he founded Netlinx, Inc. originally as a systems integration firm focused on small business networking. Over the last 20 years his focus and emphasis has been on providing professional consulting and development services in the DDI space to large Enterprise firms. In 2012, he joined Wells Fargo &amp; Co. as the technical lead for the DDI Engineering team where he leads design, architecture, and engineering tasks as part of a large DDI reengineering project. In Aug. of 2014, he re-branded Netlinx, Inc. to DDI Guru, LLC, as a top-provider of DDI Engineering, Consulting, and Automation Services company.","url":"https:\/\/www.infoblox.com\/blog\/author\/patrick-piper\/"}]}},"_links":{"self":[{"href":"https:\/\/www.infoblox.com\/blog\/wp-json\/wp\/v2\/posts\/6890","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\/358"}],"replies":[{"embeddable":true,"href":"https:\/\/www.infoblox.com\/blog\/wp-json\/wp\/v2\/comments?post=6890"}],"version-history":[{"count":2,"href":"https:\/\/www.infoblox.com\/blog\/wp-json\/wp\/v2\/posts\/6890\/revisions"}],"predecessor-version":[{"id":6895,"href":"https:\/\/www.infoblox.com\/blog\/wp-json\/wp\/v2\/posts\/6890\/revisions\/6895"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.infoblox.com\/blog\/wp-json\/wp\/v2\/media\/6893"}],"wp:attachment":[{"href":"https:\/\/www.infoblox.com\/blog\/wp-json\/wp\/v2\/media?parent=6890"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.infoblox.com\/blog\/wp-json\/wp\/v2\/categories?post=6890"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.infoblox.com\/blog\/wp-json\/wp\/v2\/tags?post=6890"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}