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

Clone access rule using API

Hi guys,

In SmartConsole you can clone any access rule by right clicking on needed rule's number, select "copy rule" and then it can be pasted at any position in any policy package.

So, if it is possible over SmartConsole, why there is no documented API for such an action ? Checking latest version of management API (v2), you can clone only complete access layer or policy package, but not just one access rule.

There must be some API "magic" done using SmartConsole. Why it is not possible to do the same over single API command ?

 

 

Kind regards,
Jozko Mrkvicka
0 Kudos
1 Solution

Accepted Solutions
Bob_Zimmerman
Authority
Authority

It's easy enough to do this with two API calls: one to see the rule you want to copy (which you have to do anyway if you're working via the API, as how else would you know you which rule you want to copy?), then a second to feed that rule's body to /add-rule with a new position.

View solution in original post

4 Replies
Tal_Paz-Fridman
Employee
Employee

I wasn’t able to find it either.

I’ll forward this to the relevant owners in R&D. If it turns out that it doesn’t exist, I’ll go ahead and open an RFE.

Thanks.

JozkoMrkvicka
Authority
Authority

Thank you for taking care 🙂

Not sure if actions in SmartConsole are somehow translated into api.elg logs on management. Another idea would be to debug SmartConsole itself and check how copy&paste of access rule is done.

Creating a small script to clone specific rule (defined by Rule UID) isnt problem here. I will most probably end up with scripting this functionality anyway...

Kind regards,
Jozko Mrkvicka
0 Kudos
Bob_Zimmerman
Authority
Authority

It's easy enough to do this with two API calls: one to see the rule you want to copy (which you have to do anyway if you're working via the API, as how else would you know you which rule you want to copy?), then a second to feed that rule's body to /add-rule with a new position.

the_rock
Legend
Legend

I agree 100% with that. I was doing some research on this myself and that seems to be the most logical way.

Andy

0 Kudos

Leaderboard

Epsum factorial non deposit quid pro quo hic escorol.

Upcoming Events

    CheckMates Events