- CheckMates
- :
- Products
- :
- Developers
- :
- API / CLI Discussion
- :
- Gaia API flaws
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Are you a member of CheckMates?
×- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Gaia API flaws
Hi,
I was tasked to develop a script lately to check routing and antispoofing on a Check Point cluster. I started with python and the Gaia API but gave up very soon and wrote a shell script because of two flaws:
- The show-static-route call returns an error if the requested route is not explicitly set. There is always a route if there is a default gateway.
- Other than stated in the documentation, the show-static-route call does not return the outgoing interface, which significantly limits the usefulness of this api call.
Are there plans to correct these issues?
Cheers
Michael
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I did get some feedback from R&D on these questions.
Unfortunately, it is operating as expected.
Generally, these API calls will only show the contents of explicitly configured routes.
The interface is only shown if you configure a route with an explicit interface as the destination.
Interestingly enough, when you use show-routes-static, the interface for the default route is included in the output.
You can see an example in the API docs: https://sc1.checkpoint.com/documents/latest/GaiaAPIs/index.html#web/show-routes-static~v1.7%20
It seems like the other API calls for different sources of routes (e.g. show-routes-bgp) includes interfaces in their output.
Which suggests they might be more suitable for your intended purpose.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What version of the API is it?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It's 1.7, latest version.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I've flagged this to the relevant R&D team, will see if I can get some feedback.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I did get some feedback from R&D on these questions.
Unfortunately, it is operating as expected.
Generally, these API calls will only show the contents of explicitly configured routes.
The interface is only shown if you configure a route with an explicit interface as the destination.
Interestingly enough, when you use show-routes-static, the interface for the default route is included in the output.
You can see an example in the API docs: https://sc1.checkpoint.com/documents/latest/GaiaAPIs/index.html#web/show-routes-static~v1.7%20
It seems like the other API calls for different sources of routes (e.g. show-routes-bgp) includes interfaces in their output.
Which suggests they might be more suitable for your intended purpose.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Okay, "operating as expected" is the answer I was expecting to be honest. I must have missed the show-routes-static call, which is (together with some json queries) all I needed. Code is at Github (https://github.com/dj0nz/cptools/blob/main/gaia_api_poc.py)
Thank you very much!
