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

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:

 

{
    "tasks": [
        {
            "task-id""01234567-89ab-cdef-b239-ae1a014fbefc",
            "task-name""Publish operation",
            "status""failed",
            "progress-percentage"100,
            "suppressed"false,
            "task-details": [
                {
                    "fault-message""Publish cannot be performed without entering a session name and description."
                }
            ]
        }
    ]
}
 
 
As i can see in the documentation publish method only accept empty body:
 
POST {{server}}/v1.1/publish
Content-Type: application/json
X-chkp-sid: {{session}}

{ }

 

How can i solve this problem?

Thanks in advance 

0 Kudos
1 Solution

Accepted Solutions
Bob_Zimmerman
Leader
Leader

You need to make a call to 'set session' to specify the new-name and description for the session.

View solution in original post

0 Kudos
3 Replies
Bob_Zimmerman
Leader
Leader

You need to make a call to 'set session' to specify the new-name and description for the session.

0 Kudos
hermanmaleiane
Explorer

Hi @Bob_Zimmerman,

Thanks for replying.

When do i need to call set session? after the invocation of add-host? 

0 Kudos
Bob_Zimmerman
Leader
Leader

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.

0 Kudos