Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Search
    • Register
    • Login
    Introducing Netgate Nexus: Multi-Instance Management at Your Fingertips.

    netgate-route API (21.07) adding a static route

    Scheduled Pinned Locked Moved TNSR
    1 Posts 1 Posters 1.1k Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • W
      windell013
      last edited by windell013

      I am attempting to add a static route via RESTCONF and it appears the YANG model may not be complete. Below is the output that I am getting:
      [root@myhostname ~]# curl -f -X GET http://tnsr/restconf/data/netgate-route:route-config
      {
      "netgate-route:route-config": {
      "dynamic": {
      "netgate-bgp:bgp": {
      "global-options": {
      "enable": false
      }
      },
      "netgate-frr:manager": {
      "global-options": {
      "ptm": false
      }
      },
      "netgate-ospf:ospf": {
      "global-options": {
      "enable": false
      }
      },
      "netgate-ospf6:ospf6": {
      "global-options": {
      "enable": false
      }
      },
      "netgate-rip:rip": {
      "global-options": {
      "enable": false
      }
      }
      }
      }
      }
      [root@myhostname ~]#

      which is not showing the "static": { } option I see here:
      https://docs.netgate.com/tnsr/en/latest/api/netgate-route.html

      This shows my current failures when attempting to view an existing static route:
      [root@myhostname ~]# curl -f -X GET http://tnsr/restconf/data/netgate-route:route-config/netgate-route:static -v
      About to connect() to tnsr port 80 (#0)
      Trying 123.123.123.123...
      Connected to tnsr (123.123.123.123) port 80 (#0)
      Server auth using Basic with user 'ansible'
      GET /restconf/data/netgate-route:route-config/netgate-route:static HTTP/1.1
      Authorization: Basic YW5zaWJsZToxcWF6MndzeCFRQVpAV1NY
      User-Agent: curl/7.29.0
      Host: tnsr
      Accept: /

      The requested URL returned error: 404 Not Found
      Closing connection 0
      curl: (22) The requested URL returned error: 404 Not Found
      [root@myhostname ~]#

      What is the best way for me to view/add/delete a static route via the RESTCONF API?

      1 Reply Last reply
      Reply Quote 0

      Hello! It looks like you're interested in this conversation, but you don't have an account yet.

      Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

      With your input, this post could be even better 💗

      Register Login
      • First post
        Last post
      Copyright 2026 Rubicon Communications LLC (Netgate). All rights reserved.
      Privacy Policy · Cookie Policy