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

Web API issue

Maybe silly question but I haven't found a solution (just a workaround):

Currently I am working on a script to populate a given network group with networks from an IPAM system (Infoblox). Everything working good except that I get an error ("Runtime error: an eclipse error has occurred enable logging on EclipseLinkExceptionHandler to see full error") if I issue a logout after the publish request.

Workaround is a "sleep 5" between the two requests. Itchy.

I assume the logout comes too fast after publish. Is there a way to get a "okay I'm finished now" from the server or to configure some kind of delay with the publish request? Anyone here having the same issue? Am I doing something seriously wrong?

Thanks in advance!

Michael

0 Kudos
1 Solution

Accepted Solutions
Stuart_Green1
Employee
Employee

Hey Michael, some API functions are asynchronous and will return a task ID that you need to poll to check for completion. I've got an example of it working here https://github.com/chkp-stuartgreen/policy-automation-poc/blob/main/packages/simplecpapi.py . But once that task completes successfully (or fails, depending on what you need) you should be good to continue. 

View solution in original post

(1)
4 Replies
Stuart_Green1
Employee
Employee

Hey Michael, some API functions are asynchronous and will return a task ID that you need to poll to check for completion. I've got an example of it working here https://github.com/chkp-stuartgreen/policy-automation-poc/blob/main/packages/simplecpapi.py . But once that task completes successfully (or fails, depending on what you need) you should be good to continue. 

(1)
dj0Nz
Advisor

Hi Stuart, this is exactly what I've been missing. Thanks a lot!

0 Kudos
dj0Nz
Advisor

Hi Stuart, I made it. Outcome at https://github.com/dj0nz/cptools/blob/main/import_from_infoblox.sh. Once again, thank you!

0 Kudos
_Val_
Admin
Admin

@dj0Nz Hey there, do you want to add this as an item to our ToolBox collection? If yes, please send me a message at vloukine@checkpoint.com.

0 Kudos

Leaderboard

Epsum factorial non deposit quid pro quo hic escorol.

Upcoming Events

    CheckMates Events