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

How to specity a Session Name and Description in a mgmt_cli publish

I can't seem to find the syntax anywhere for adding a session name and description so that I can publish from the cli.  Any help would be appreciated.

 

mgmt_cli publish -s id.txt


---------------------------------------------
Time: [18:46:50] 20/8/2019
---------------------------------------------
"Publish operation" failed (100%)
tasks:
- task-id: "01234567-89ab-cdef-b80c-135154317141"
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."

0 Kudos
1 Solution

Accepted Solutions
masher
Employee
Employee

I could not find an option to set a session name and description from the publish command. It is possible to set the session-name and description prior to publish.

mgmt_cli -s sid.txt set-session description "description goes here" new-name "sessionname"
mgmt_cli -s sid.txt publish

Example:

[Expert@vmgmt01:0]# mgmt_cli -r true login > session.id
[Expert@vmgmt01:0]# mgmt_cli -s session.id show session -f json | jq -r .description

[Expert@vmgmt01:0]# mgmt_cli -s session.id show session -f json | jq -r .name
null
[Expert@vmgmt01:0]# mgmt_cli -s session.id set-session description "new description" new-name "new-sessionname"
[Expert@vmgmt01:0]# mgmt_cli -s session.id show session -f json | jq -r .name
new-sessionname
[Expert@vmgmt01:0]# mgmt_cli -s session.id show session -f json | jq -r .description
new description
[Expert@vmgmt01:0]# mgmt_cli -s session.id publish

More Information:

https://sc1.checkpoint.com/documents/latest/APIs/index.html#cli/set-session~v1.5%20

 

View solution in original post

1 Reply
masher
Employee
Employee

I could not find an option to set a session name and description from the publish command. It is possible to set the session-name and description prior to publish.

mgmt_cli -s sid.txt set-session description "description goes here" new-name "sessionname"
mgmt_cli -s sid.txt publish

Example:

[Expert@vmgmt01:0]# mgmt_cli -r true login > session.id
[Expert@vmgmt01:0]# mgmt_cli -s session.id show session -f json | jq -r .description

[Expert@vmgmt01:0]# mgmt_cli -s session.id show session -f json | jq -r .name
null
[Expert@vmgmt01:0]# mgmt_cli -s session.id set-session description "new description" new-name "new-sessionname"
[Expert@vmgmt01:0]# mgmt_cli -s session.id show session -f json | jq -r .name
new-sessionname
[Expert@vmgmt01:0]# mgmt_cli -s session.id show session -f json | jq -r .description
new description
[Expert@vmgmt01:0]# mgmt_cli -s session.id publish

More Information:

https://sc1.checkpoint.com/documents/latest/APIs/index.html#cli/set-session~v1.5%20

 

Leaderboard

Epsum factorial non deposit quid pro quo hic escorol.

Upcoming Events

    CheckMates Events