{"id":22630,"date":"2018-09-12T12:15:01","date_gmt":"2018-09-12T09:15:01","guid":{"rendered":"https:\/\/www.webcodegeeks.com\/?p=22630"},"modified":"2018-09-10T00:48:46","modified_gmt":"2018-09-09T21:48:46","slug":"invoking-ansible-inside-python-flask","status":"publish","type":"post","link":"https:\/\/www.webcodegeeks.com\/python\/invoking-ansible-inside-python-flask\/","title":{"rendered":"Invoking Ansible Inside Python Flask"},"content":{"rendered":"<p>Pasting sample code that can be used as is to run ansible inside python flask app. This would be a very useful base implementation when devops need to control system over the web or someone tries to control systems over internet without cli.<\/p>\n<p><strong>Prerequisites<\/strong><\/p>\n<p><span style=\"text-decoration: underline;\"><em>Install Python3<\/em><\/span><\/p>\n<p>#PYTHON3 ( Assuming Centos7 or RHEL Flavor). Change accordingly for your env<\/p>\n<pre class=\"brush:bash; wrap-lines:false\">yum -y install <a href=\"https:\/\/centos7.iuscommunity.org\/ius-release.rpm\" rel=\"nofollow\">https:\/\/centos7.iuscommunity.org\/ius-release.rpm<\/a>\r\nyum -y install python36u\r\nyum -y install python36u-pip\r\nyum -y install python36u-devel\r\n\r\nvirtualenv \u2013python=\/usr\/bin\/python3.6 venv<\/pre>\n<pre class=\"brush:bash; wrap-lines:false\">from flask import (Blueprint)\r\n\r\nimport json\r\nimport shutil\r\nfrom collections import namedtuple\r\nfrom ansible.parsing.dataloader import DataLoader\r\nfrom ansible.vars.manager import VariableManager\r\nfrom ansible.inventory.manager import InventoryManager\r\nfrom ansible.playbook.play import Play\r\nfrom ansible.executor.task_queue_manager import TaskQueueManager\r\nfrom ansible.plugins.callback import CallbackBase\r\nimport ansible.constants as C\r\n\r\n\r\n#Blueprint URL Configuration routes\r\nbp = Blueprint('AnsibleController', __name__, url_prefix='\/AnsibleController')\r\n\r\n\r\n# Ansible Return callback\r\nclass ResultCallback(CallbackBase):\r\n    \"\"\"A sample callback plugin used for performing an action as results come in\r\n\r\n    If you want to collect all results into a single object for processing at\r\n    the end of the execution, look into utilizing the ``json`` callback plugin\r\n    or writing your own custom callback plugin\r\n    \"\"\"\r\n    def __init__(self):\r\n        self.resp = []\r\n\r\n    def v2_runner_on_ok(self, result, **kwargs):\r\n        \"\"\"Print a json representation of the result\r\n\r\n        This method could store the result in an instance attribute for retrieval later\r\n        \"\"\"\r\n        host = result._host\r\n        self.resp.append(json.dumps({host.name: result._result}, indent=4))\r\n\r\n#print (json.dumps(out, sort_keys=True, indent=4, separators=(',', ': ')))\r\n\r\n@bp.route('\/ping', methods=('GET', 'POST'))\r\ndef ping():\r\n    # since API is constructed for CLI it expects certain options to always be set, named tuple 'fakes' the args parsing options object\r\n    Options = namedtuple('Options',\r\n                         ['connection', 'module_path', 'forks', 'become', 'become_method', 'become_user', 'check',\r\n                          'diff'])\r\n    options = Options(connection='local', module_path=['\/etc\/swiftui\/.swiftui\/ansible\/mymodules'], forks=100, become=None, become_method=None,\r\n                      become_user=None, check=False, diff=False)\r\n\r\n    # initialize needed objects\r\n    loader = DataLoader()  # Takes care of finding and reading yaml, json and ini files\r\n    passwords = dict(vault_pass='secret')\r\n\r\n    # Instantiate our ResultCallback for handling results as they come in. Ansible expects this to be one of its main display outlets\r\n    results_callback = ResultCallback()\r\n\r\n    # create inventory, use path to host config file as source or hosts in a comma separated string\r\n    inventory = InventoryManager(loader=loader, sources='localhost,')\r\n\r\n    # variable manager takes care of merging all the different sources to give you a unifed view of variables available in each context\r\n    variable_manager = VariableManager(loader=loader, inventory=inventory)\r\n\r\n    # create datastructure that represents our play, including tasks, this is basically what our YAML loader does internally.\r\n    play_source = dict(\r\n        name=\"Ansible Play\",\r\n        hosts='localhost',\r\n        gather_facts='no',\r\n        tasks=[\r\n            dict(action=dict(module='shell', args='ls'), register='shell_out'),\r\n            dict(action=dict(module='debug', args=dict(msg='{{shell_out.stdout}}')))\r\n        ]\r\n    )\r\n\r\n    # Create play object, playbook objects use .load instead of init or new methods,\r\n    # this will also automatically create the task objects from the info provided in play_source\r\n    play = Play().load(play_source, variable_manager=variable_manager, loader=loader)\r\n\r\n    # Run it - instantiate task queue manager, which takes care of forking and setting up\r\n    # all objects to iterate over host list and tasks\r\n    tqm = None\r\n    try:\r\n        tqm = TaskQueueManager(\r\n            inventory=inventory,\r\n            variable_manager=variable_manager,\r\n            loader=loader,\r\n            options=options,\r\n            passwords=passwords,\r\n            stdout_callback=results_callback,\r\n            # Use our custom callback instead of the ``default`` callback plugin, which prints to stdout\r\n        )\r\n        result = tqm.run(play)  # most interesting data for a play is actually sent to the callback's methods\r\n    finally:\r\n        # we always need to cleanup child procs and the structres we use to communicate with them\r\n        if tqm is not None:\r\n            tqm.cleanup()\r\n\r\n        # Remove ansible tmpdir\r\n        shutil.rmtree(C.DEFAULT_LOCAL_TMP, True)\r\n\r\n    return ''.join(results_callback.resp)<\/pre>\n<div class=\"attribution\">\n<table>\n<tbody>\n<tr>\n<td>Published on Web Code Geeks with permission by Ashwin Kumar, partner at our <a href=\"\/\/www.webcodegeeks.com\/join-us\/wcg\/\" target=\"_blank\" rel=\"noopener\">WCG program<\/a>. See the original article here: <a href=\"https:\/\/ashwinrayaprolu.wordpress.com\/2018\/09\/07\/invoking-ansible-inside-python-flask\/\" target=\"_blank\" rel=\"noopener\">Invoking Ansible Inside Python Flask<\/a><\/p>\n<p>Opinions expressed by Web Code Geeks contributors are their own.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Pasting sample code that can be used as is to run ansible inside python flask app. This would be a very useful base implementation when devops need to control system over the web or someone tries to control systems over internet without cli. Prerequisites Install Python3 #PYTHON3 ( Assuming Centos7 or RHEL Flavor). Change accordingly &hellip;<\/p>\n","protected":false},"author":8307,"featured_media":1651,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[53],"tags":[422],"class_list":["post-22630","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-python","tag-ansible"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Invoking Ansible Inside Python Flask - Web Code Geeks - 2026<\/title>\n<meta name=\"description\" content=\"Interested to learn about ansible? Check out our article where we are pasting sample code that can be used as is to run ansible inside python flask app!\" \/>\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.webcodegeeks.com\/python\/invoking-ansible-inside-python-flask\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Invoking Ansible Inside Python Flask - Web Code Geeks - 2026\" \/>\n<meta property=\"og:description\" content=\"Interested to learn about ansible? Check out our article where we are pasting sample code that can be used as is to run ansible inside python flask app!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.webcodegeeks.com\/python\/invoking-ansible-inside-python-flask\/\" \/>\n<meta property=\"og:site_name\" content=\"Web Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/webcodegeeks\" \/>\n<meta property=\"article:published_time\" content=\"2018-09-12T09:15:01+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/python-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Ashwin Kumar\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@webcodegeeks\" \/>\n<meta name=\"twitter:site\" content=\"@webcodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Ashwin Kumar\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.webcodegeeks.com\/python\/invoking-ansible-inside-python-flask\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/python\/invoking-ansible-inside-python-flask\/\"},\"author\":{\"name\":\"Ashwin Kumar\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/839c507478bcdcc6ee1f4542310b3bed\"},\"headline\":\"Invoking Ansible Inside Python Flask\",\"datePublished\":\"2018-09-12T09:15:01+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/python\/invoking-ansible-inside-python-flask\/\"},\"wordCount\":97,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/python\/invoking-ansible-inside-python-flask\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/python-logo.jpg\",\"keywords\":[\"Ansible\"],\"articleSection\":[\"Python\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.webcodegeeks.com\/python\/invoking-ansible-inside-python-flask\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.webcodegeeks.com\/python\/invoking-ansible-inside-python-flask\/\",\"url\":\"https:\/\/www.webcodegeeks.com\/python\/invoking-ansible-inside-python-flask\/\",\"name\":\"Invoking Ansible Inside Python Flask - Web Code Geeks - 2026\",\"isPartOf\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/python\/invoking-ansible-inside-python-flask\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/python\/invoking-ansible-inside-python-flask\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/python-logo.jpg\",\"datePublished\":\"2018-09-12T09:15:01+00:00\",\"description\":\"Interested to learn about ansible? Check out our article where we are pasting sample code that can be used as is to run ansible inside python flask app!\",\"breadcrumb\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/python\/invoking-ansible-inside-python-flask\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.webcodegeeks.com\/python\/invoking-ansible-inside-python-flask\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/python\/invoking-ansible-inside-python-flask\/#primaryimage\",\"url\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/python-logo.jpg\",\"contentUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/python-logo.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.webcodegeeks.com\/python\/invoking-ansible-inside-python-flask\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.webcodegeeks.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Python\",\"item\":\"https:\/\/www.webcodegeeks.com\/category\/python\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Invoking Ansible Inside Python Flask\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#website\",\"url\":\"https:\/\/www.webcodegeeks.com\/\",\"name\":\"Web Code Geeks\",\"description\":\"Web Developers Resource Center\",\"publisher\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.webcodegeeks.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\/\/www.webcodegeeks.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"contentUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/webcodegeeks\",\"https:\/\/x.com\/webcodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/839c507478bcdcc6ee1f4542310b3bed\",\"name\":\"Ashwin Kumar\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/15b83b01a14ab41def5a3c6fc165e98b9c1d23b57f18bc92b385203ab51b53f1?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/15b83b01a14ab41def5a3c6fc165e98b9c1d23b57f18bc92b385203ab51b53f1?s=96&d=mm&r=g\",\"caption\":\"Ashwin Kumar\"},\"sameAs\":[\"http:\/\/ashwinrayaprolu.wordpress.com\/\"],\"url\":\"https:\/\/www.webcodegeeks.com\/author\/ashwin-kumar\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Invoking Ansible Inside Python Flask - Web Code Geeks - 2026","description":"Interested to learn about ansible? Check out our article where we are pasting sample code that can be used as is to run ansible inside python flask app!","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.webcodegeeks.com\/python\/invoking-ansible-inside-python-flask\/","og_locale":"en_US","og_type":"article","og_title":"Invoking Ansible Inside Python Flask - Web Code Geeks - 2026","og_description":"Interested to learn about ansible? Check out our article where we are pasting sample code that can be used as is to run ansible inside python flask app!","og_url":"https:\/\/www.webcodegeeks.com\/python\/invoking-ansible-inside-python-flask\/","og_site_name":"Web Code Geeks","article_publisher":"https:\/\/www.facebook.com\/webcodegeeks","article_published_time":"2018-09-12T09:15:01+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/python-logo.jpg","type":"image\/jpeg"}],"author":"Ashwin Kumar","twitter_card":"summary_large_image","twitter_creator":"@webcodegeeks","twitter_site":"@webcodegeeks","twitter_misc":{"Written by":"Ashwin Kumar","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.webcodegeeks.com\/python\/invoking-ansible-inside-python-flask\/#article","isPartOf":{"@id":"https:\/\/www.webcodegeeks.com\/python\/invoking-ansible-inside-python-flask\/"},"author":{"name":"Ashwin Kumar","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/839c507478bcdcc6ee1f4542310b3bed"},"headline":"Invoking Ansible Inside Python Flask","datePublished":"2018-09-12T09:15:01+00:00","mainEntityOfPage":{"@id":"https:\/\/www.webcodegeeks.com\/python\/invoking-ansible-inside-python-flask\/"},"wordCount":97,"commentCount":0,"publisher":{"@id":"https:\/\/www.webcodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.webcodegeeks.com\/python\/invoking-ansible-inside-python-flask\/#primaryimage"},"thumbnailUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/python-logo.jpg","keywords":["Ansible"],"articleSection":["Python"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.webcodegeeks.com\/python\/invoking-ansible-inside-python-flask\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.webcodegeeks.com\/python\/invoking-ansible-inside-python-flask\/","url":"https:\/\/www.webcodegeeks.com\/python\/invoking-ansible-inside-python-flask\/","name":"Invoking Ansible Inside Python Flask - Web Code Geeks - 2026","isPartOf":{"@id":"https:\/\/www.webcodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.webcodegeeks.com\/python\/invoking-ansible-inside-python-flask\/#primaryimage"},"image":{"@id":"https:\/\/www.webcodegeeks.com\/python\/invoking-ansible-inside-python-flask\/#primaryimage"},"thumbnailUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/python-logo.jpg","datePublished":"2018-09-12T09:15:01+00:00","description":"Interested to learn about ansible? Check out our article where we are pasting sample code that can be used as is to run ansible inside python flask app!","breadcrumb":{"@id":"https:\/\/www.webcodegeeks.com\/python\/invoking-ansible-inside-python-flask\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.webcodegeeks.com\/python\/invoking-ansible-inside-python-flask\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/python\/invoking-ansible-inside-python-flask\/#primaryimage","url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/python-logo.jpg","contentUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/python-logo.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/www.webcodegeeks.com\/python\/invoking-ansible-inside-python-flask\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.webcodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"Python","item":"https:\/\/www.webcodegeeks.com\/category\/python\/"},{"@type":"ListItem","position":3,"name":"Invoking Ansible Inside Python Flask"}]},{"@type":"WebSite","@id":"https:\/\/www.webcodegeeks.com\/#website","url":"https:\/\/www.webcodegeeks.com\/","name":"Web Code Geeks","description":"Web Developers Resource Center","publisher":{"@id":"https:\/\/www.webcodegeeks.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.webcodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.webcodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.webcodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/webcodegeeks","https:\/\/x.com\/webcodegeeks"]},{"@type":"Person","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/839c507478bcdcc6ee1f4542310b3bed","name":"Ashwin Kumar","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/15b83b01a14ab41def5a3c6fc165e98b9c1d23b57f18bc92b385203ab51b53f1?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/15b83b01a14ab41def5a3c6fc165e98b9c1d23b57f18bc92b385203ab51b53f1?s=96&d=mm&r=g","caption":"Ashwin Kumar"},"sameAs":["http:\/\/ashwinrayaprolu.wordpress.com\/"],"url":"https:\/\/www.webcodegeeks.com\/author\/ashwin-kumar\/"}]}},"_links":{"self":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts\/22630","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/users\/8307"}],"replies":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/comments?post=22630"}],"version-history":[{"count":0,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts\/22630\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/media\/1651"}],"wp:attachment":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/media?parent=22630"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/categories?post=22630"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/tags?post=22630"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}