Issue with setting QoS egress value with API

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Please sign in to see details of an important advisory in our Customer Advisories area.

Issue with setting QoS egress value with API

L2 Linker

For scripting purpose I need to be able to set egress-max values in QoS with the API.

First I created a QoS profile, TRUST-QOS,  and set the egress-max to 20

In powershell, I have the following:

 

 

	$paURL = "https://" + $PAIP + "//api/?key=" + $apiKey + 
	"&type=config&action=set&xpath=/config/devices/entry[@name='localhost.localdomain']/network/qos/profile/entry[@name='TRUST-QOS']/aggregate-bandwidth/egress-max&element=<egress-max>30</egress-max>"
	Invoke-WebRequest -uri $panURL

 

This is supposed to set the value to 30. The reply I get is :

 

    set failed, may need to override template object first

 

This Palo Alto is new (it's a VM), not yet licenced or connected to a Panorama.

However I can set the value in the GUI or on the CLI with :

 

set network qos profile TRUST-QOS aggregate-bandwidth egress-max 30

Overrides are for templates but as this is not connected to a panorama and has no template.

Any idea why I get this message with the API? I am able to do many other configurations with the API.

thanks.

1 accepted solution

Accepted Solutions

L2 Linker

Solved this with 

 

action=edit

instead of

action=set

 

View solution in original post

1 REPLY 1

L2 Linker

Solved this with 

 

action=edit

instead of

action=set

 

  • 1 accepted solution
  • 2057 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!