Cisco Cisco Security Manager 4.11 User Guide

Page of 301
 
 
 
  
 
Cisco Security Manager 4.11 API Specification (Version 2.3) 
 
Page  229
 
Figure 185: Basic CSMSession Usage 
 
The first step in working with write APIs is to have a CSMSession created or opened. In this flow, we are creating a 
new CSMSession. Then the respective write  APIs are invoked by passing the unique csmSessionID that 
createCSMSession returns. To get the device ID to be used in the APIs, getDeviceListByCapability() can be used. 
The next step is to validate the changes for correctness. Because submitCSMSession performs internal validation, it 
is not mandatory to do validateCSMSession every time. The submitCSMSession based on the CSM server mode 
returns  whether approve is needed  or not  (that is, when workflow is enabled,  approval is required). If approval is 
needed, then ApproveCSMSession needs to be invoked and then followed by the deployment-related APIs. 
 
In the next flowchart, the use of open and close CSMSessions is explained. CloseCSMSession is used when partial 
changes are done during a https session, then later at a time when more changes need to be done as part of the same 
CSMSession, openCSMSession needs to be used. If the changes done during CSMSession need to be reverted, then 
discardCSMSession should be used. 
 
                                                   
 
Figure 186:  Close and Open CSMSession Usage