- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
11-13-2013 02:15 PM
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.
&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
11-13-2013 03:06 PM
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
11-13-2013 05:35 PM
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
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!