Issue with setting QoS egress value with API

Reply
Highlighted
L2 Linker

Issue with setting QoS egress value with API

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.


Accepted Solutions
Highlighted
L2 Linker

Solved this with 

 

action=edit

instead of

action=set

 

View solution in original post


All Replies
Highlighted
L2 Linker

Solved this with 

 

action=edit

instead of

action=set

 

View solution in original post

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 Live Community as a whole!

The Live Community thanks you for your participation!