<?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>topic Re: SERVICE TEMPLATE REST API in NSO Developer Hub Discussions</title>
    <link>https://community.cisco.com/t5/nso-developer-hub-discussions/service-template-rest-api/m-p/3472903#M754</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;COOL!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i find it always helps and makes sense when i see "real examples"&lt;/P&gt;&lt;P&gt;glad it works !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can PATCH and DELETE too this way &lt;IMG src="https://community.cisco.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;best regards,&lt;/P&gt;&lt;P&gt;Gregg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 09 Aug 2017 21:00:10 GMT</pubDate>
    <dc:creator>gschudel</dc:creator>
    <dc:date>2017-08-09T21:00:10Z</dc:date>
    <item>
      <title>SERVICE TEMPLATE REST API</title>
      <link>https://community.cisco.com/t5/nso-developer-hub-discussions/service-template-rest-api/m-p/3472898#M749</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am able to successfully create device templates and deploy the variables in those templates via REST API calls.&amp;nbsp; I have not been able to successfully deploy SERVICE templates via REST API.&amp;nbsp; I am able to do so via the CLI, however it would be beneficial for integration purposes if I could do so via REST API.&amp;nbsp; Does anyone have a good working example of deploying a SERVICE template via REST API?&amp;nbsp; Any assistance would be greatly appreciated!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Mar 2019 11:57:18 GMT</pubDate>
      <guid>https://community.cisco.com/t5/nso-developer-hub-discussions/service-template-rest-api/m-p/3472898#M749</guid>
      <dc:creator>allenvose</dc:creator>
      <dc:date>2019-03-01T11:57:18Z</dc:date>
    </item>
    <item>
      <title>Re: SERVICE TEMPLATE REST API</title>
      <link>https://community.cisco.com/t5/nso-developer-hub-discussions/service-template-rest-api/m-p/3472899#M750</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi...&lt;/P&gt;&lt;P&gt;are you just trying to create a service instance via REST?&lt;/P&gt;&lt;P&gt;do you want to use XML or JSON payload(s)?&lt;/P&gt;&lt;P&gt;** if you create a service instance via CLI, and then "show services | display XML" (or json) -- it will give you the output required (and that you can then modify by changing variables) for repeating this via REST&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here's an example -- starting from a display of a service, and then how this is rendered in the curl call...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #0000ff; font-size: 8pt; font-family: 'courier new', courier;"&gt;admin@ncs% show services stackedIfMgr tix01 | display json&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #0000ff; font-size: 8pt; font-family: 'courier new', courier;"&gt;{&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #0000ff; font-size: 8pt; font-family: 'courier new', courier;"&gt;&amp;nbsp; "data": {&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #0000ff; font-size: 8pt; font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "tailf-ncs:services": {&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #0000ff; font-size: 8pt; font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "stackedIfMgr:stackedIfMgr": [&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #0000ff; font-size: 8pt; font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #0000ff; font-size: 8pt; font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "name": "tix01",&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #0000ff; font-size: 8pt; font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "cat-device": "c0",&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #0000ff; font-size: 8pt; font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "asa-device": "asa0",&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #0000ff; font-size: 8pt; font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "cat-wan-ip": "10.1.1.1/30",&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #0000ff; font-size: 8pt; font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "cat-lan-ip": "172.16.16.1/24",&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #0000ff; font-size: 8pt; font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "asa-port": "80",&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #0000ff; font-size: 8pt; font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "asa-host": "172.16.16.16"&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #0000ff; font-size: 8pt; font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #0000ff; font-size: 8pt; font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ]&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #0000ff; font-size: 8pt; font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #0000ff; font-size: 8pt; font-family: 'courier new', courier;"&gt;&amp;nbsp; }&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #0000ff; font-size: 8pt; font-family: 'courier new', courier;"&gt;}&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #0000ff; font-size: 8pt; font-family: 'courier new', courier;"&gt;[ok][2017-08-07 11:02:19]&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #0000ff; font-size: 8pt; font-family: 'courier new', courier;"&gt;[edit]&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt; font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;admin@ncs%&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and then in CURL (with in-line data...)&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;&lt;STRONG style="color: #0000ff;"&gt;curl -X POST -u admin:admin --header "Content-Type:application/vnd.yang.data+json" &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG style="font-size: 8pt; font-family: 'courier new', courier;"&gt;&lt;A class="jive-link-external-small" href="http://127.0.0.1:8080/api/running/services" rel="nofollow" target="_blank"&gt;&lt;SPAN style="color: #0000ff;"&gt;http://127.0.0.1:8080/api/running/services&lt;/SPAN&gt;&lt;/A&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;&lt;STRONG style="color: #0000ff;"&gt; -d '{"stackedIfMgr:stackedIfMgr": [{"name": "tix01", "cat-device": "c0", "asa-device": "asa0", "cat-wan-ip": "10.1.1.1/30", "cat-lan-ip": "172.16.16.1/24", "asa-port": "80", "asa-host": "172.16.16.16"}]}'&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can do this in XML as well, and you can point to files to load rather than in-line data (all your choice).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For "modifying" an existing service instance, use "-X PATCH"&lt;/P&gt;&lt;P&gt;For "deleting" an existing service instance, use "-X DELETE"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Aug 2017 23:23:20 GMT</pubDate>
      <guid>https://community.cisco.com/t5/nso-developer-hub-discussions/service-template-rest-api/m-p/3472899#M750</guid>
      <dc:creator>gschudel</dc:creator>
      <dc:date>2017-08-08T23:23:20Z</dc:date>
    </item>
    <item>
      <title>Re: SERVICE TEMPLATE REST API</title>
      <link>https://community.cisco.com/t5/nso-developer-hub-discussions/service-template-rest-api/m-p/3472900#M751</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;gschudel,&lt;/P&gt;&lt;P&gt;&amp;nbsp; My service template looks as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[edit services ospf]&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.cisco.com/"&gt;devops@ncs%&lt;/A&gt; show&lt;/P&gt;&lt;P&gt;ospf WASHINGTON {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; interface ge-0/0/5;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; area 0.0.0.0;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;devops@ncs&amp;gt; show services ospf | display xml&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;lt;config xmlns='&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://tail-f.com/ns/config1.0" rel="nofollow" target="_blank"&gt;http://tail-f.com/ns/config1.0&lt;/A&gt;&lt;SPAN&gt;"&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;services xmlns="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://tail-f.com/ns/ncs" rel="nofollow" target="_blank"&gt;http://tail-f.com/ns/ncs&lt;/A&gt;&lt;SPAN&gt;"&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;ospf xmlns="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://com/example/ospf" rel="nofollow" target="_blank"&gt;http://com/example/ospf&lt;/A&gt;&lt;SPAN&gt;"&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;device-name&amp;gt;WASHINGTON&amp;lt;/device-name&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;interface&amp;gt;ge-0/0/5&amp;lt;/interface&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;area&amp;gt;0.0.0.0&amp;lt;/area&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/ospf&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/services&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;/config&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; I took the xml output from the template (only 2 variables required, which are device-name, interface, and area) and substituted the name for another device called NEWYORK.&amp;nbsp; The interface and area variables remained constant for purposes of this test.&amp;nbsp; I added those contents to a text file called OSPF.CFG and stored it in the directory from which my REST calls are to be executed.&amp;nbsp; The REST API is written in Python Requests and looks as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;import requests&lt;/P&gt;&lt;P&gt;from requests.auth import HTTPBasicAuth&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;url = ('&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://xx.xx.xx.xx:8080/api/running/services" rel="nofollow" target="_blank"&gt;http://xx.xx.xx.xx:8080/api/running/services&lt;/A&gt;&lt;SPAN&gt;')&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;headers = {'Content-Type': 'application/vnd.yang.data+xml}&lt;/P&gt;&lt;P&gt;content = open('ospf.cfg', 'rb').read&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;config = requests.post(url, auth=HTTPBasicAuth('admin', 'admin'), data=content)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;print config.text&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Note that I also executed a "curl-based" script that mirrored the Python script.&amp;nbsp; The result remained the same, which was:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;lt;errors xmlns="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://tail-f.com/ns/tailf-rest-error" rel="nofollow" target="_blank"&gt;http://tail-f.com/ns/tailf-rest-error&lt;/A&gt;&lt;SPAN&gt;"&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;error&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;error-tag&amp;gt;malformed-message&amp;lt;/error-tag&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;error-urlpath&amp;gt;/api/running/services&amp;lt;/error-urlpath&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;error-message&amp;gt;unknown element: services in /ncs:services/ncs:services&amp;lt;/error-message&amp;gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/error&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;/errors&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Also note that I am able to successfully deploy this service as long as I commit it via the CLI, but I am unable to do so via REST API.&amp;nbsp; I'm not sure what I'm doing incorrectly here.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Aug 2017 15:30:38 GMT</pubDate>
      <guid>https://community.cisco.com/t5/nso-developer-hub-discussions/service-template-rest-api/m-p/3472900#M751</guid>
      <dc:creator>allenvose</dc:creator>
      <dc:date>2017-08-09T15:30:38Z</dc:date>
    </item>
    <item>
      <title>Re: SERVICE TEMPLATE REST API</title>
      <link>https://community.cisco.com/t5/nso-developer-hub-discussions/service-template-rest-api/m-p/3472901#M752</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;unclear what's happening in your python code (or curl) -- could be in the header(?) or auth(?)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i just tried another one on my box - this time in XML (since you're using that)... &lt;/P&gt;&lt;P&gt;here is the service info, and then the CURL call... (xml in-line -- should be same if calling a file)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #0000ff; font-size: 8pt; font-family: 'courier new', courier;"&gt;admin@ncs% show services secTemplate1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #0000ff; font-size: 8pt; font-family: 'courier new', courier;"&gt;secTemplate1 FOOFOO {&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #0000ff; font-size: 8pt; font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; device c0;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #0000ff; font-size: 8pt; font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; access ro;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #0000ff; font-size: 8pt; font-family: 'courier new', courier;"&gt;}&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #0000ff; font-size: 8pt; font-family: 'courier new', courier;"&gt;[ok][2017-08-09 11:06:03]&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #0000ff; font-size: 8pt; font-family: 'courier new', courier;"&gt;[edit]&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #0000ff; font-size: 8pt; font-family: 'courier new', courier;"&gt;admin@ncs% show services secTemplate1 | display xml&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #0000ff; font-size: 8pt; font-family: 'courier new', courier;"&gt;&amp;lt;config xmlns="&lt;A class="jive-link-external-small" href="http://tail-f.com/ns/config/1.0" rel="nofollow" target="_blank"&gt;&lt;SPAN style="color: #0000ff;"&gt;http://tail-f.com/ns/config/1.0&lt;/SPAN&gt;&lt;/A&gt;"&amp;gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #0000ff; font-size: 8pt; font-family: 'courier new', courier;"&gt;&amp;nbsp; &amp;lt;services xmlns="&lt;A class="jive-link-external-small" href="http://tail-f.com/ns/ncs" rel="nofollow" target="_blank"&gt;&lt;SPAN style="color: #0000ff;"&gt;http://tail-f.com/ns/ncs&lt;/SPAN&gt;&lt;/A&gt;"&amp;gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #0000ff; font-size: 8pt; font-family: 'courier new', courier;"&gt;&amp;nbsp; &amp;lt;secTemplate1 xmlns="&lt;A class="jive-link-external-small" href="http://com/example/secTemplate1" rel="nofollow" target="_blank"&gt;&lt;SPAN style="color: #0000ff;"&gt;http://com/example/secTemplate1&lt;/SPAN&gt;&lt;/A&gt;"&amp;gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #0000ff; font-size: 8pt; font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;comm-str&amp;gt;FOOFOO&amp;lt;/comm-str&amp;gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #0000ff; font-size: 8pt; font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;device&amp;gt;c0&amp;lt;/device&amp;gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #0000ff; font-size: 8pt; font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;access&amp;gt;ro&amp;lt;/access&amp;gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #0000ff; font-size: 8pt; font-family: 'courier new', courier;"&gt;&amp;nbsp; &amp;lt;/secTemplate1&amp;gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #0000ff; font-size: 8pt; font-family: 'courier new', courier;"&gt;&amp;nbsp; &amp;lt;/services&amp;gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #0000ff; font-size: 8pt; font-family: 'courier new', courier;"&gt;&amp;lt;/config&amp;gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #0000ff; font-size: 8pt; font-family: 'courier new', courier;"&gt;[ok][2017-08-09 11:06:08]&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #0000ff; font-size: 8pt; font-family: 'courier new', courier;"&gt;[edit]&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #0000ff; font-size: 8pt; font-family: 'courier new', courier;"&gt;admin@ncs%&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And then...&lt;/P&gt;&lt;P&gt;in linux...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #0000ff; font-size: 8pt; font-family: 'courier new', courier;"&gt;curl -X POST -u admin:admin --header "Content-Type:application/vnd.yang.data+xml" &lt;A class="jive-link-external-small" href="http://127.0.0.1:8080/api/running/services" rel="nofollow" target="_blank"&gt;&lt;SPAN style="color: #0000ff;"&gt;http://127.0.0.1:8080/api/running/services&lt;/SPAN&gt;&lt;/A&gt; \&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt; font-family: 'courier new', courier;"&gt;-d '&amp;lt;secTemplate1 xmlns="&lt;A class="jive-link-external-small" href="http://com/example/secTemplate1" rel="nofollow" target="_blank"&gt;&lt;SPAN style="color: #0000ff;"&gt;http://com/example/secTemplate1&lt;/SPAN&gt;&lt;/A&gt;"&amp;gt;&amp;lt;comm-str&amp;gt;BLAHBLAH&amp;lt;/comm-str&amp;gt;&amp;lt;device&amp;gt;c0&amp;lt;/device&amp;gt;&amp;lt;access&amp;gt;ro&amp;lt;/access&amp;gt;&amp;lt;/secTemplate1&amp;gt;'&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #993366; font-size: 10pt; font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;&lt;SPAN&gt;GSCHUDEL-M-61C2:Training442 gschudel$ curl -X POST -u admin:admin --header "Content-Type:application/vnd.yang.data+xml" &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://127.0.0.1:8080/api/running/services" rel="nofollow" target="_blank"&gt;http://127.0.0.1:8080/api/running/services&lt;/A&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #993366; font-size: 10pt; font-family: 'courier new', courier;"&gt;&lt;SPAN&gt; -d '&amp;lt;secTemplate1 xmlns="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://com/example/secTemplate1" rel="nofollow" target="_blank"&gt;http://com/example/secTemplate1&lt;/A&gt;&lt;SPAN&gt;"&amp;gt;&amp;lt;comm-str&amp;gt;BLAHBLAH&amp;lt;/comm-str&amp;gt;&amp;lt;device&amp;gt;c0&amp;lt;/device&amp;gt;&amp;lt;access&amp;gt;ro&amp;lt;/access&amp;gt;&amp;lt;/secTemplate1&amp;gt;'&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #993366; font-family: 'courier new', courier;"&gt;GSCHUDEL-M-61C2:Training442 gschudel$&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #993366; font-family: 'courier new', courier;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #993366; font-family: 'courier new', courier;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and now on NSO...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt; color: #0000ff;"&gt;&lt;STRONG&gt;admin@ncs%&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt; color: #0000ff;"&gt;&lt;STRONG&gt;System message at 2017-08-09 11:33:54...&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt; color: #0000ff;"&gt;&lt;STRONG&gt;Commit performed by admin via http using rest.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt; color: #0000ff;"&gt;&lt;STRONG&gt;admin@ncs% show services secTemplate1 | display xml&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt; color: #0000ff;"&gt;&lt;STRONG&gt;&lt;SPAN&gt;&amp;lt;config xmlns="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://tail-f.com/ns/config/1.0" rel="nofollow" target="_blank"&gt;http://tail-f.com/ns/config/1.0&lt;/A&gt;&lt;SPAN&gt;"&amp;gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt; color: #0000ff;"&gt;&lt;STRONG&gt;&lt;SPAN&gt;&amp;nbsp; &amp;lt;services xmlns="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://tail-f.com/ns/ncs" rel="nofollow" target="_blank"&gt;http://tail-f.com/ns/ncs&lt;/A&gt;&lt;SPAN&gt;"&amp;gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt; color: #0000ff;"&gt;&lt;STRONG style="color: #ff0000;"&gt;&lt;SPAN&gt;&amp;nbsp; &amp;lt;secTemplate1 xmlns="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://com/example/secTemplate1" rel="nofollow" target="_blank"&gt;http://com/example/secTemplate1&lt;/A&gt;&lt;SPAN&gt;"&amp;gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt; color: #ff0000;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;comm-str&amp;gt;BLAHBLAH&amp;lt;/comm-str&amp;gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt; color: #ff0000;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;device&amp;gt;c0&amp;lt;/device&amp;gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt; color: #ff0000;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;access&amp;gt;ro&amp;lt;/access&amp;gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt; color: #0000ff;"&gt;&lt;STRONG style="color: #ff0000;"&gt;&amp;nbsp; &amp;lt;/secTemplate1&amp;gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt; color: #0000ff;"&gt;&lt;STRONG&gt;&lt;SPAN&gt;&amp;nbsp; &amp;lt;secTemplate1 xmlns="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://com/example/secTemplate1" rel="nofollow" target="_blank"&gt;http://com/example/secTemplate1&lt;/A&gt;&lt;SPAN&gt;"&amp;gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt; color: #0000ff;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;comm-str&amp;gt;FOOFOO&amp;lt;/comm-str&amp;gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt; color: #0000ff;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;device&amp;gt;c0&amp;lt;/device&amp;gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt; color: #0000ff;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;access&amp;gt;ro&amp;lt;/access&amp;gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt; color: #0000ff;"&gt;&lt;STRONG&gt;&amp;nbsp; &amp;lt;/secTemplate1&amp;gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt; color: #0000ff;"&gt;&lt;STRONG&gt;&amp;nbsp; &amp;lt;/services&amp;gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt; color: #0000ff;"&gt;&lt;STRONG&gt;&amp;lt;/config&amp;gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt; color: #0000ff;"&gt;&lt;STRONG&gt;[ok][2017-08-09 11:33:57]&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Aug 2017 18:35:36 GMT</pubDate>
      <guid>https://community.cisco.com/t5/nso-developer-hub-discussions/service-template-rest-api/m-p/3472901#M752</guid>
      <dc:creator>gschudel</dc:creator>
      <dc:date>2017-08-09T18:35:36Z</dc:date>
    </item>
    <item>
      <title>Re: SERVICE TEMPLATE REST API</title>
      <link>https://community.cisco.com/t5/nso-developer-hub-discussions/service-template-rest-api/m-p/3472902#M753</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;THANK YOU SOOOOOOOOOO VERY MUCH!!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem was where my XML start and end was being copied from!&lt;/P&gt;&lt;P&gt;I needed to start the copy of the XML, not from the config, or services tag, but from the template-named tag itself.&amp;nbsp; And from there, obviously end it with the ending template tag.&amp;nbsp; That resolved my problem!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I still had problems doing the same thing in Python, but CURL works flawlessly.&amp;nbsp; I'll figure out the Python Requests issue on an aside, but for now, you've helped me out TREMENDOUSLY!&amp;nbsp; Many thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Aug 2017 19:40:34 GMT</pubDate>
      <guid>https://community.cisco.com/t5/nso-developer-hub-discussions/service-template-rest-api/m-p/3472902#M753</guid>
      <dc:creator>allenvose</dc:creator>
      <dc:date>2017-08-09T19:40:34Z</dc:date>
    </item>
    <item>
      <title>Re: SERVICE TEMPLATE REST API</title>
      <link>https://community.cisco.com/t5/nso-developer-hub-discussions/service-template-rest-api/m-p/3472903#M754</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;COOL!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i find it always helps and makes sense when i see "real examples"&lt;/P&gt;&lt;P&gt;glad it works !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can PATCH and DELETE too this way &lt;IMG src="https://community.cisco.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;best regards,&lt;/P&gt;&lt;P&gt;Gregg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Aug 2017 21:00:10 GMT</pubDate>
      <guid>https://community.cisco.com/t5/nso-developer-hub-discussions/service-template-rest-api/m-p/3472903#M754</guid>
      <dc:creator>gschudel</dc:creator>
      <dc:date>2017-08-09T21:00:10Z</dc:date>
    </item>
  </channel>
</rss>

