<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: Ambari Create Blueprint -- 405 Method Not Allowed in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-Create-Blueprint-405-Method-Not-Allowed/m-p/201206#M65687</link>
    <description>&lt;P&gt;Hi, Jay,  thanks for your reply. Problem solved using curl and change the payload a little bit.&lt;/P&gt;&lt;P&gt;I followed the instruction documented at,&lt;/P&gt;&lt;P&gt;&lt;A href="https://cwiki.apache.org/confluence/display/AMBARI/Blueprints" target="_blank"&gt;https://cwiki.apache.org/confluence/display/AMBARI/Blueprints&lt;/A&gt;&lt;/P&gt;&lt;P&gt;And I noticed the difference when I switching the tools. &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;When using Postman,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I have to add  ":" when trigger the GET request to get blueprint, so my url is like&lt;/P&gt;&lt;P&gt;&lt;A href="http://testambarihost:8080/api/v1/clusters/:mycluster?format=blueprint" target="_blank"&gt;http://testambarihost:8080/api/v1/clusters/:mycluster?format=blueprint&lt;/A&gt;&lt;/P&gt;&lt;P&gt;And if I change the url to&lt;/P&gt;&lt;P&gt;&lt;A href="http://testambarihost:8080/api/v1/clusters/mycluster?format=blueprint" target="_blank"&gt;http://testambarihost:8080/api/v1/clusters/mycluster?format=blueprint&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I will get below exception&lt;/P&gt;&lt;P&gt;{ "status" : 404, "message" : "The requested resource doesn't exist: Cluster not found, clusterName=mycluster" }&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;When using curl,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;no ":" is needed, and the post request you've mentioned works.&lt;/P&gt;&lt;P&gt;BTW, another modification I found required, the response body I get from step one, I need to manually remove the top level wrapper which wraps the blueprint as array items, after removing the top level wrapper of the body, I can post without issue.&lt;/P&gt;</description>
    <pubDate>Fri, 28 Jul 2017 14:40:17 GMT</pubDate>
    <dc:creator>liuruibnu</dc:creator>
    <dc:date>2017-07-28T14:40:17Z</dc:date>
    <item>
      <title>Ambari Create Blueprint -- 405 Method Not Allowed</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-Create-Blueprint-405-Method-Not-Allowed/m-p/201204#M65685</link>
      <description>&lt;P&gt;Hi, I am just trying to automate the deployment using blueprints.&lt;/P&gt;&lt;P&gt;Step 1, I am exporting blueprint of my existing cluster by invoking below url&lt;/P&gt;&lt;P&gt;HTTP Get&lt;/P&gt;&lt;P&gt;&lt;A href="http://&amp;lt;ambariserverhost&amp;gt;:8080/api/v1/clusters/:&amp;lt;myclusterName&amp;gt;?format=blueprint" target="_blank"&gt;http://&amp;lt;ambariserverhost&amp;gt;:8080/api/v1/clusters/:&amp;lt;myclusterName&amp;gt;?format=blueprint&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Using basic authentication with ambari console admin user and password&lt;/P&gt;&lt;P&gt;Step 2, I am trying the register this exported blueprint to ambari. The url I try to post is,&lt;/P&gt;&lt;P&gt;&lt;A href="http://&amp;lt;ambariserverhost&amp;gt;:8080/api/v1/blueprints/:testblueprint" target="_blank"&gt;http://&amp;lt;ambariserverhost&amp;gt;:8080/api/v1/blueprints/:testblueprint&lt;/A&gt;&lt;/P&gt;&lt;P&gt;And then I got the exception of "405 Method Not Allowed"&lt;/P&gt;&lt;P&gt;What could be the possible reason? I also tried to post the same body to another ambari which the cluster has not been created, same exception. (because I want to confirm that it's not because when I tried to register the blue print, I've already got an existing cluster).&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jul 2017 13:51:11 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-Create-Blueprint-405-Method-Not-Allowed/m-p/201204#M65685</guid>
      <dc:creator>liuruibnu</dc:creator>
      <dc:date>2017-07-28T13:51:11Z</dc:date>
    </item>
    <item>
      <title>Re: Ambari Create Blueprint -- 405 Method Not Allowed</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-Create-Blueprint-405-Method-Not-Allowed/m-p/201205#M65686</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/19411/liuruibnu.html" nodeid="19411"&gt;@Rachel Rui Liu&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Why do you have an extra  : colon in the step2 url ?   (here:   /api/v1/blueprint/&lt;STRONG&gt;:testblueprint&lt;/STRONG&gt; )&lt;/P&gt;&lt;P&gt;Ideally the HTTP method should be "POST" and the post url should be something like following:&lt;/P&gt;&lt;PRE&gt;# curl -H "X-Requested-By: ambari" -X POST -u admin:admin &lt;A href="http://&amp;lt;ambari-hostname&amp;gt;:8080/api/v1/blueprints/&amp;lt;blueprint-name&amp;gt;" target="_blank"&gt;http://&amp;lt;ambari-hostname&amp;gt;:8080/api/v1/blueprints/&amp;lt;blueprint-name&amp;gt;&lt;/A&gt;; -d @cluster_configuration.json

Example:

# curl -H "X-Requested-By: ambari" -X POST -u admin:admin &lt;A href="http://erie1.example.com:8080/api/v1/blueprints/testblueprint" target="_blank"&gt;http://erie1.example.com:8080/api/v1/blueprints/testblueprint&lt;/A&gt; -d @/PATH/TO/cluster_configuration.json&lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;More details: &lt;A href="https://community.hortonworks.com/articles/47170/automate-hdp-installation-using-ambari-blueprints.html" target="_blank"&gt;https://community.hortonworks.com/articles/47170/automate-hdp-installation-using-ambari-blueprints.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jul 2017 13:59:04 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-Create-Blueprint-405-Method-Not-Allowed/m-p/201205#M65686</guid>
      <dc:creator>jsensharma</dc:creator>
      <dc:date>2017-07-28T13:59:04Z</dc:date>
    </item>
    <item>
      <title>Re: Ambari Create Blueprint -- 405 Method Not Allowed</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-Create-Blueprint-405-Method-Not-Allowed/m-p/201206#M65687</link>
      <description>&lt;P&gt;Hi, Jay,  thanks for your reply. Problem solved using curl and change the payload a little bit.&lt;/P&gt;&lt;P&gt;I followed the instruction documented at,&lt;/P&gt;&lt;P&gt;&lt;A href="https://cwiki.apache.org/confluence/display/AMBARI/Blueprints" target="_blank"&gt;https://cwiki.apache.org/confluence/display/AMBARI/Blueprints&lt;/A&gt;&lt;/P&gt;&lt;P&gt;And I noticed the difference when I switching the tools. &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;When using Postman,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I have to add  ":" when trigger the GET request to get blueprint, so my url is like&lt;/P&gt;&lt;P&gt;&lt;A href="http://testambarihost:8080/api/v1/clusters/:mycluster?format=blueprint" target="_blank"&gt;http://testambarihost:8080/api/v1/clusters/:mycluster?format=blueprint&lt;/A&gt;&lt;/P&gt;&lt;P&gt;And if I change the url to&lt;/P&gt;&lt;P&gt;&lt;A href="http://testambarihost:8080/api/v1/clusters/mycluster?format=blueprint" target="_blank"&gt;http://testambarihost:8080/api/v1/clusters/mycluster?format=blueprint&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I will get below exception&lt;/P&gt;&lt;P&gt;{ "status" : 404, "message" : "The requested resource doesn't exist: Cluster not found, clusterName=mycluster" }&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;When using curl,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;no ":" is needed, and the post request you've mentioned works.&lt;/P&gt;&lt;P&gt;BTW, another modification I found required, the response body I get from step one, I need to manually remove the top level wrapper which wraps the blueprint as array items, after removing the top level wrapper of the body, I can post without issue.&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jul 2017 14:40:17 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-Create-Blueprint-405-Method-Not-Allowed/m-p/201206#M65687</guid>
      <dc:creator>liuruibnu</dc:creator>
      <dc:date>2017-07-28T14:40:17Z</dc:date>
    </item>
  </channel>
</rss>

