Not able to create an Address Object using postman

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Not able to create an Address Object using postman

L0 Member

Hi!

I'm using Postman to create an address object using Rest API.

This is what I'm posting:

*https://10.46.169.141/restapi/v9.1/Objects/Addresses?name={{"My-Address"}}&location=vsys&vsys=vsys1

 

This is my body:

{
    "entry": {
        "@name""My-Address",
        "ip-netmask""8.8.8.8",
        "description""My test address"
    }
}
 
 
This is my error:
{
    "code"3,
    "message""Malformed Command",
    "details": [
        {
            "@type""CauseInfo",
            "causes": [
                {
                    "code"18,
                    "module""panui_mgmt",
                    "description""Malformed Command: Malformed Request."
                }
            ]
        }
    ]
}
 
I'm using JSON but I'm not sure what I'm missing.
1 REPLY 1

L5 Sessionator

Hi @sconejo, could it have been the braces {{}} being mixed up between the URL and the JSON? I would use variables in both or neither, and probably choose to use a variable in both. This works for example:

https://{{host}}/restapi/v9.1/Objects/Addresses?name={{object-name}}&location=vsys&vsys=vsys1

{
    "entry": {
        "@name": "{{object-name}}",
        "ip-netmask": "8.8.8.8",
        "description": "My test address"
    }
}

 

Help the community: "Like" helpful comments, and click "Accept as Solution" if you found your answer 🙂
  • 1663 Views
  • 1 replies
  • 0 Likes
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!