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

    API response format for Nexus/MIM API endpoints

    Scheduled Pinned Locked Moved Multi-Instance Management
    5 Posts 2 Posters 1.8k Views 2 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.
    • luckman212L
      luckman212 LAYER 8 Rebel Alliance
      last edited by luckman212

      Hey guys
      I was able to figure out how to update the monitor IP of a gateway using PUT directed at the /system/gateways/{id} endpoint. It works!

      The response I get is shaped like this

      {
        "msg": "Gateway updated",
        "alrt": false,
        "sb": false,
        "alrtoln": false,
        "alrtclr": "",
        "auth": false,
        "status": "",
        "result": ""
      }
      

      My question is: how do we interpret these keys/values?

      I assume Gateway updated indicates success. But a boolean is more typical for an API "success" response.

      Do any of those bools (sb, alrt, alrtoln etc) mean the op was successful ?

      luckman212L 1 Reply Last reply
      Reply Quote 0
      • luckman212L
        luckman212 LAYER 8 Rebel Alliance @luckman212
        last edited by

        I peeked in at pfsense_result.py on the pfsense-api GitHub repo, which seems to be where the result class is defined. But, it didn't reveal anything further.

        1 Reply Last reply
        Reply Quote 0
        • M
          marcosm Netgate
          last edited by marcosm

          They're mainly there for some GUI compatibility; it may get updated in the future. E.g. the alrt attributes are meant to be alert outline and color. Go off of what msg says.

          luckman212L 1 Reply Last reply
          Reply Quote 0
          • luckman212L
            luckman212 LAYER 8 Rebel Alliance @marcosm
            last edited by

            Thanks. If the API is still being worked on, it would be nicer to have a strict success: true | false bool for automation vs parsing a text field.

            luckman212L 1 Reply Last reply
            Reply Quote 0
            • luckman212L
              luckman212 LAYER 8 Rebel Alliance @luckman212
              last edited by

              Any new developments here for API response formats?

              I was working with the /aliases endpoint today and notice its response has this shape:

              {
                "msg": "alias updated successful",
                "alrt": false,
                "sb": false,
                "alrtoln": false,
                "alrtclr": "",
                "auth": false,
                "status": "",
                "result": ""
              }
              

              The suggestion to use the msg to determine success/failure still feels odd to me, especially in light that the wording is not even proper English (should say either "alias update successful" or "alias updated successfully")

              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