- Products
- Learn
- Local User Groups
- Partners
- More
What's New in R82.10?
10 December @ 5pm CET / 11am ET
Improve Your Security Posture with
Threat Prevention and Policy Insights
Overlap in Security Validation
Help us to understand your needs better
CheckMates Go:
Maestro Madness
Hello all,
I am working on some script and I would like to have some questions sorted out about API performance and best practise. I am on R80.30 MDS and using API version 1.5.
My idea is to have opened only 1 session (via login), store session into a variable (or file) and during the entire script, working only with this one session. Means, no other sessions will be opened as I don't want to have an additional load on the machine for login and logout operations.
If I am using "-r true" for any API calls (let's say show domains), will it mean that in the background there will be a new login and logout ?
At the moment I am struggling with "show packages" for a specific domain and the fact that -s parameter isn't working.
The code looks like that:
#!/bin/bash
mgmt_cli login user "aa" password "aaaa" --format json > sid.txt
mgmt_cli show packages -d "My_Domain" -s sid.txt --format json
mgmt_cli logout -s sid.txt
rm sid.txt
And it doesn't give me the desired output - packages of the domain "My_Domain".
In case I use the following syntax, all is working fine (note -r true parameter instead of -s sid.txt):
#!/bin/bash
mgmt_cli login user "aa" password "aaaa" --format json > sid.txt
mgmt_cli show packages -d "My_Domain" -r true --format json
mgmt_cli logout -s sid.txt
rm sid.txt
But the working solution will result that I will have 2 sessions opened, right ? And I want only 1, not more.
What I am missing here ?
Thank you.
So that was a missing bit, thank you 🙂
If I have 20 domains, do I need to iterate over all domains and login into each and every domain separately ? There is no way to login like "super login" which login session will be valid for all domains ?
Not 100% correct.
If I am not mistaken on MDS a API command without domain accesses the system domain.
Global needs to be specified as any other!
Leaderboard
Epsum factorial non deposit quid pro quo hic escorol.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
Wed 03 Dec 2025 @ 10:00 AM (COT)
Última Sesión del Año – CheckMates LATAM: ERM & TEM con ExpertosThu 04 Dec 2025 @ 12:30 PM (SGT)
End-of-Year Event: Securing AI Transformation in a Hyperconnected World - APACThu 04 Dec 2025 @ 03:00 PM (CET)
End-of-Year Event: Securing AI Transformation in a Hyperconnected World - EMEAThu 04 Dec 2025 @ 02:00 PM (EST)
End-of-Year Event: Securing AI Transformation in a Hyperconnected World - AmericasWed 03 Dec 2025 @ 10:00 AM (COT)
Última Sesión del Año – CheckMates LATAM: ERM & TEM con ExpertosThu 04 Dec 2025 @ 12:30 PM (SGT)
End-of-Year Event: Securing AI Transformation in a Hyperconnected World - APACThu 04 Dec 2025 @ 03:00 PM (CET)
End-of-Year Event: Securing AI Transformation in a Hyperconnected World - EMEAThu 04 Dec 2025 @ 02:00 PM (EST)
End-of-Year Event: Securing AI Transformation in a Hyperconnected World - AmericasAbout CheckMates
Learn Check Point
Advanced Learning
YOU DESERVE THE BEST SECURITY