Create a Post
cancel
Showing results for 
Search instead for 
Did you mean: 
Anthony_Kahwati
Collaborator

Getting started with API: UID

Hello

I am getting started with the R80 API and am not a scripter and have really no experience of any of it, but from the few commands I have looked at I can already see the benefit of the API. I want to get started in deploying a script or two but want to start properly.

Can anyone tell me the relevance of the UID? I know it is a unique ID for each object or item, but is it important to the person writing the script? The reason I ask is that if I want to run any commands to look at the rule base for example, I have to specify a UID or  a rule name.

Just looking for anyone to clarify with me how important this is to the person writing the script and if there is anything anywhere to help me understand better how interested I should be in it.

Thanks

Anthony

0 Kudos
1 Reply
Uri_Bialik

When your script refers to objects (e.g. rules, networks, hosts, ...) by their name, there's always a risk that this name would change sometime in the future and your script will "break".

When you use UIDs, even if someone changes the name of the object your script would not be effected.

When handling "rule" objects, relying on the name is especially problematic: the "name" field of a rule is optional and does not have to be unique.

0 Kudos

Leaderboard

Epsum factorial non deposit quid pro quo hic escorol.

Upcoming Events

    CheckMates Events