Create a Post
cancel
Showing results for 
Search instead for 
Did you mean: 
ndiegel
Participant
Jump to solution

Building NAT via API - Parameter error for position?

All,

Trying to build NAT policy via API, but receiving parameter errors. For position, options in reference docs are top, bottom, above, below. Trying to use above, but receiving parameter error as follows:

message: "Invalid parameter for [position]. The invalid value [above] should be replaced by one of the following values: [top, bottom]"

What am I missing? Is the doc wrong? Am I wrong? Let's say I have a section called 'BuildAbove' and I want to pop a new section above that, I was trying 'add nat-section package standard position above BuildAbove name SectionA'.

Thanks in advance.

R81.20 JHF 105 using mgmt api ref v1.9.1

0 Kudos
1 Solution

Accepted Solutions
Bob_Zimmerman
MVP Gold
MVP Gold

The 'position' key takes a few possible types of value:

  1. An integer, representing the number you want the new rule to have.
  2. A string which can have the values "top" or "bottom". Any other value here is invalid.
  3. A nested object with a key:value pair in it:
    1. Key 'top', value of the name or UUID of the section you want the rule to be in the top of
    2. Key 'above', value of the name or UUID of the rule or section header you want the rule inserted above
    3. Key 'below', value of the name or UUID of the rule or section header you want the rule inserted below
    4. Key 'bottom', value of the name or UUID of the section you want the rule to be in the bottom of

So to insert a rule below another rule, your position key:value will look like this:

### mgmt_cli command form:
mgmt_cli ... position.above 00112233-4455-6677-8899-aabbccddeeff

### JSON form for remote calls:
{
...,
"position": {"above": "00112233-4455-6677-8899-aabbccddeeff"},
...
}

View solution in original post

3 Replies
the_rock
MVP Platinum
MVP Platinum

Are you able to send an example of what you tried?

Best,
Andy
Bob_Zimmerman
MVP Gold
MVP Gold

The 'position' key takes a few possible types of value:

  1. An integer, representing the number you want the new rule to have.
  2. A string which can have the values "top" or "bottom". Any other value here is invalid.
  3. A nested object with a key:value pair in it:
    1. Key 'top', value of the name or UUID of the section you want the rule to be in the top of
    2. Key 'above', value of the name or UUID of the rule or section header you want the rule inserted above
    3. Key 'below', value of the name or UUID of the rule or section header you want the rule inserted below
    4. Key 'bottom', value of the name or UUID of the section you want the rule to be in the bottom of

So to insert a rule below another rule, your position key:value will look like this:

### mgmt_cli command form:
mgmt_cli ... position.above 00112233-4455-6677-8899-aabbccddeeff

### JSON form for remote calls:
{
...,
"position": {"above": "00112233-4455-6677-8899-aabbccddeeff"},
...
}
ndiegel
Participant

I get what you're saying Bob. So let's say I want to just paste this right into the Command Line from my SMS, how do I represent that key:value pair? I just tried 'add nat-section package standard position above:BuildAbove' and it gave the same message that my only two choices are top and bottom. I really appreciate that.

0 Kudos

Leaderboard

Epsum factorial non deposit quid pro quo hic escorol.

Upcoming Events

    CheckMates Events