API call to clone multiple URL Filtering categories

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.

API call to clone multiple URL Filtering categories

L1 Bithead

Hi,

I am trying to clone 2 URL Filtering Profiles "testProfile1" and "testProfile2" into "testProfile1-1" and "testProfile2-1" using the following REST API call.

https://HOST_IP_ADDRESS/api/?key=LUFRPT1mQUJoTjh4S05rbkpBcWtLb2pZRERJekJTcDA9U2F1cU8ybzFzajFiaG5DSXV...

&xpath=/config/devices/entry/vsys/entry[@name='vsys2']/profiles/url-filtering&from=/config/devices/entry/vsys/entry[@name='vsys2']/profiles/url-filtering/entry[@name='testProfile1'%20or%20@name='testProfile2']

&newname=[@name='testProfile1-1'%20or%20@name='testProfile2-1']&target=0008C100900

However,  it doesn't look like it's working. Can some one assist me with the correct syntax here?

Thanks,

Venkat

2 REPLIES 2

L5 Sessionator

Hello Venkat,

The syntax to be used to clone an existing configuration object using xpath paramter would be:

http(s)://hostname/api/?type=config&action=clone&xpath=/config/devices/entry/vsys/entry[@name='vsys1']/rulebase/security/rules/&from=/config/devices/entry/vsys/entry[@name='vsys1']/rulebase/security/rules/entry[@name='rule1']&newname=rule2


Keeping syntax in consideration, in your case the REST API would be:

https://hostname/api/?type=config&action=clone&xpath=/config/devices/entry/vsys/entry[@name='vsys1']...'testProfile1']&newname=testProfile1-1

Let me know how that works out for you.

Thanks and regards,

Kunal Adak

Hi Kunal,

Thanks for your response. I was able to clone one profile at a time with the API call you provided. However, I am looking for a single API call to clone multiple profiles, as intended in my original question.

Do I have to send multiple clone API calls to clone multiple profiles? Or, Is there a way to send multiple profiles in the same call, just like the "Delete" functionality.

Thanks,

Venkat

  • 2198 Views
  • 2 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!