<div dir="ltr">Thanks Eric for your reply! makes sense...<div><br></div><div>I tried to use the two CURL commands. </div><div><br></div><div>GET worked and I was able to see the end point being used. </div><div>curl -XGET <a href="http://localhost:19200/apiman_gateway/service/prism:osa:1.0/_source">http://localhost:19200/apiman_gateway/service/prism:osa:1.0/_source</a><br></div><div><div>{&quot;endpoint&quot;:&quot;<a href="http://OLD_URL">http://OLD_URL</a>&quot;,&quot;endpointType&quot;:&quot;rest&quot;,&quot;publicService&quot;:false,&quot;organizationId&quot;:&quot;prism&quot;,&quot;serviceId&quot;:&quot;osa&quot;,&quot;version&quot;:&quot;1.0&quot;,&quot;endpointProperties&quot;:[],&quot;policies&quot;:[]}</div></div><div><br></div><div><br></div><div><br></div><div>But the PUT failed as below..</div><div><br></div><div><div>curl -XPUT <a href="http://localhost:19200/apiman_gateway/service/prism:osa:1.0/_source">http://localhost:19200/apiman_gateway/service/prism:osa:1.0/_source</a> -d &#39;{&quot;endpoint&quot;:&quot;<a href="http://NEW_URL">http://NEW_URL</a>&quot;,&quot;endpointType&quot;:&quot;rest&quot;,&quot;publicService&quot;:false,&quot;organizationId&quot;:&quot;prism&quot;,&quot;serviceId&quot;:&quot;osa&quot;,&quot;version&quot;:&quot;1.0&quot;,&quot;endpointProperties&quot;:[],&quot;policies&quot;:[]}&#39;</div><div><br></div><div>No handler found for uri [/apiman_gateway/service/prism:osa:1.0/_source] and method [PUT]</div></div><div><br></div><div><br></div><div>Thanks again for your time</div><div><br></div><div>Sanjay</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jan 4, 2016 at 11:26 AM, Eric Wittmann <span dir="ltr">&lt;<a href="mailto:eric.wittmann@redhat.com" target="_blank">eric.wittmann@redhat.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Sanjay, thanks for the questions.<br>
<br>
Currently there is no easy way to update the backend implementation endpiont URL without creating a new version of the service.<br>
<br>
However, if this is a one-off sort of thing then you may be able to get it done.  It depends mostly on what configuration you are using.  But I&#39;ll explain based on the most recent 1.1.x release (1.1.9.Final) with its default configuration.<br>
<br>
The Manager and Gateway are decoupled, resulting in the duplication of *some* of the data (including the endpoint URL).  So when you &quot;publish&quot; a service from the Manager, the Gateway is given information about the service.  This information is stored in the Gateway&#39;s &quot;registry&quot;.  By default the registry implementation is elasticsearch.  So if you wanted to change the endpoint URL for a service, you would need to update that information in your Database (you did this) *and* in elasticsearch.<br>
<br>
It&#39;s actually not that difficult to update the information in elasticsearch.  You&#39;ll need to find the correct record and then update it.  If you&#39;re using the default installation, then ES is running on port 19200.  If you want to change the following service:<br>
<br>
Organization:  Example<br>
Service ID:    MyService<br>
Version:       1.0<br>
<br>
Then you might do something like this:<br>
<br>
curl -XGET <a href="http://localhost:19200/apiman_gateway/service/Example:MyService:1.0/_source" rel="noreferrer" target="_blank">http://localhost:19200/apiman_gateway/service/Example:MyService:1.0/_source</a><br>
<br>
You could then take that JSON result, modify the bits you want to change, and then update it like so (as an example - please replace the JSON below with the JSON you get back from the GET above):<br>
<br>
curl -XPUT <a href="http://localhost:19200/apiman_gateway/service/Example:MyService:1.0" rel="noreferrer" target="_blank">http://localhost:19200/apiman_gateway/service/Example:MyService:1.0</a> -d &#39;<br>
{<br>
  &quot;endpoint&quot; : &quot;<a href="http://UPDATED-ENDPOINT-HERE" rel="noreferrer" target="_blank">http://UPDATED-ENDPOINT-HERE</a>&quot;,<br>
  &quot;endpointType&quot; : &quot;rest&quot;,<br>
  &quot;publicService&quot; : true,<br>
  &quot;organizationId&quot; : &quot;Example&quot;,<br>
  &quot;serviceId&quot;: &quot;MyService&quot;,<br>
  &quot;version&quot; : &quot;1.0&quot;,<br>
  &quot;endpointProperties&quot;: [],<br>
  &quot;policies&quot;:[]<br>
}<br>
&#39;<br>
<br>
Once this is done you&#39;ll have to restart apiman so that the Gateway picks up the changes.<br>
<br>
Note: we are making some changes in apiman 1.2.x that will make all of this easier under some circumstances.  In particular, as of apiman 1.2.0.Final you will be able to re-publish &quot;Public&quot; services (now called APIs).  So if the API is public then you can simply make changes and then republish those changes to the Gateway.  If the API is *not* public then the current semantics are the same:  you cannot make changes and republish because that may violate contracts that consumers have made with your API.<br>
<br>
-Eric<div><div class="h5"><br>
<br>
<br>
On 12/29/2015 12:19 PM, Sanjay Melinamani wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">
Hi All,<br>
I am using APIMAN 1.1.9 and for an existing API that I have published to<br>
consumers, I like to change its backend implementation end point URL<br>
without changing the API service version.<br>
I updated the backend implementation URL in database table<br>
&quot;service_versions&quot;. I can see the updated URL from UI but still the<br>
gateway is using the old implementation URL specified.<br>
Does it cache the implementation URL once the service is published ? Is<br>
there anyway I can update  the implementation URL for an existing service?<br>
<br>
Appreciate your time and help.<br>
<br>
Thanks<br>
Sanjay<br>
<br>
<br>
<br>
<br></div></div>
_______________________________________________<br>
Apiman-user mailing list<br>
<a href="mailto:Apiman-user@lists.jboss.org" target="_blank">Apiman-user@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/apiman-user" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/apiman-user</a><br>
<br>
</blockquote>
</blockquote></div><br></div>