- CheckMates
- :
- Products
- :
- Developers
- :
- API / CLI Discussion
- :
- Re: Publish cannot be performed with web_api
- 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
Publish cannot be performed with web_api
Hi team,
I'm getting a error while using the mthod publish after using a method add-host .
I use the task-id returned in the publish method on the method show-task and i got the below response:
POST {{server}}/v1.1/publish Content-Type: application/json X-chkp-sid: {{session}} { }
How can i solve this problem?
Thanks in advance
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You need to make a call to 'set session' to specify the new-name and description for the session.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You need to make a call to 'set session' to specify the new-name and description for the session.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Bob_Zimmerman,
Thanks for replying.
When do i need to call set session? after the invocation of add-host?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Call it any time after login and before you try to publish.
This is not needed by default. Somebody must have enabled the option on the management server to require all sessions have a name and description.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hello,
question could you invoke set session ? because i can't add host tries to publish if i run it first and set session creates the session and publish it automatically.
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It sounds like you're trying to use it with '-r true'. That switch is a batch of API commands: login, make the call in the command line, publish, logout. You can't use it to make changes if you require sessions to have a name or description. Instead, you need to do all of these as distinct steps, like so:
- login
- Set your session properties
- Make your change
- publish
- logout
