<?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: Working out RESTCONF URLs in Controllers</title>
    <link>https://community.cisco.com/t5/controllers/working-out-restconf-urls/m-p/4589524#M2443</link>
    <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.cisco.com/t5/user/viewprofilepage/user-id/346978"&gt;@ChrisNewnham_&lt;/a&gt;&amp;nbsp;take a look at YANG Suite,&amp;nbsp;&lt;A href="https://developer.cisco.com/yangsuite/" target="_blank"&gt;https://developer.cisco.com/yangsuite/&lt;/A&gt;&amp;nbsp;IMO a little easier to use the PYANG.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;</description>
    <pubDate>Sat, 09 Apr 2022 14:15:35 GMT</pubDate>
    <dc:creator>bigevilbeard</dc:creator>
    <dc:date>2022-04-09T14:15:35Z</dc:date>
    <item>
      <title>Working out RESTCONF URLs</title>
      <link>https://community.cisco.com/t5/controllers/working-out-restconf-urls/m-p/4589123#M2442</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could someone please guide me on the best practise for determining URLs for doing something - e.g. I want to fetch all of the SNMP servers and add a new server.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A target="_blank" rel="noopener"&gt;https://&amp;lt;sandbox&amp;gt;:&amp;lt;port&amp;gt;/restconf/data/?????&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is it possible to do this without the PYANG tool?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 08 Apr 2022 14:06:02 GMT</pubDate>
      <guid>https://community.cisco.com/t5/controllers/working-out-restconf-urls/m-p/4589123#M2442</guid>
      <dc:creator>ChrisNewnham_</dc:creator>
      <dc:date>2022-04-08T14:06:02Z</dc:date>
    </item>
    <item>
      <title>Re: Working out RESTCONF URLs</title>
      <link>https://community.cisco.com/t5/controllers/working-out-restconf-urls/m-p/4589524#M2443</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.cisco.com/t5/user/viewprofilepage/user-id/346978"&gt;@ChrisNewnham_&lt;/a&gt;&amp;nbsp;take a look at YANG Suite,&amp;nbsp;&lt;A href="https://developer.cisco.com/yangsuite/" target="_blank"&gt;https://developer.cisco.com/yangsuite/&lt;/A&gt;&amp;nbsp;IMO a little easier to use the PYANG.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;</description>
      <pubDate>Sat, 09 Apr 2022 14:15:35 GMT</pubDate>
      <guid>https://community.cisco.com/t5/controllers/working-out-restconf-urls/m-p/4589524#M2443</guid>
      <dc:creator>bigevilbeard</dc:creator>
      <dc:date>2022-04-09T14:15:35Z</dc:date>
    </item>
    <item>
      <title>Re: Working out RESTCONF URLs</title>
      <link>https://community.cisco.com/t5/controllers/working-out-restconf-urls/m-p/4589647#M2444</link>
      <description>&lt;P&gt;Thanks - I'm struggling to work out where the URL ends and the JSON object begins.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example, I'm trying to add an nssa area to ospf (e.g. area 5).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The correct GET URL is:&amp;nbsp;&lt;A href="https://{{device}}:{{port}}/restconf/data/Cisco-IOS-XE-native:native/Cisco-IOS-XE-native:router" target="_blank"&gt;https://{{device}}:{{port}}/restconf/data/Cisco-IOS-XE-native:native/Cisco-IOS-XE-native:router&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But for POSTs: &lt;A href="https://{{device}}:{{port}}/restconf/data/Cisco-IOS-XE-native:native/Cisco-IOS-XE-native:router" target="_blank"&gt;https://{{device}}:{{port}}/restconf/data/Cisco-IOS-XE-native:native/Cisco-IOS-XE-native:router&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My payload:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;{
        "Cisco-IOS-XE-ospf:router-ospf": {
            "ospf": {
                "process-id": [
                    {
                        "id": 1,
                        "area": [
                            {
                                "area-id": 5,
                                "nssa": {}
                            }
                        ]
                    }
                ]
            }
        }
    }&lt;/PRE&gt;&lt;PRE&gt;{
    "errors": {
        "error": [
            {
                "error-message": "object already exists: /ios:native/ios:router/ios-ospf:router-ospf",
                "error-path": "/Cisco-IOS-XE-native:native/router",
                "error-tag": "data-exists",
                "error-type": "application"
            }
        ]
    }
}&lt;/PRE&gt;&lt;P&gt;The error message:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 10 Apr 2022 07:32:12 GMT</pubDate>
      <guid>https://community.cisco.com/t5/controllers/working-out-restconf-urls/m-p/4589647#M2444</guid>
      <dc:creator>ChrisNewnham_</dc:creator>
      <dc:date>2022-04-10T07:32:12Z</dc:date>
    </item>
    <item>
      <title>Re: Working out RESTCONF URLs</title>
      <link>https://community.cisco.com/t5/controllers/working-out-restconf-urls/m-p/4590015#M2445</link>
      <description>&lt;P&gt;&lt;a href="https://community.cisco.com/t5/user/viewprofilepage/user-id/346978"&gt;@ChrisNewnham_&lt;/a&gt;&amp;nbsp;Based on your error there it looks like this config is already present on the device. When you do a POST, you provide the URI for where an instance is going to be created. When you do a PATCH, you provide the URI to the node you want to modify. It's down to the semantics of whether you modify the content in the URI you specify or create an instance on that URI. Whatever URI you provide needs to correspond to the payload that goes along with it - namely, the root of the payload will be different depending on the depth of the URI you provide.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Apr 2022 09:02:44 GMT</pubDate>
      <guid>https://community.cisco.com/t5/controllers/working-out-restconf-urls/m-p/4590015#M2445</guid>
      <dc:creator>bigevilbeard</dc:creator>
      <dc:date>2022-04-11T09:02:44Z</dc:date>
    </item>
  </channel>
</rss>

