The API client can create a branch for an existing project.
To create a new project, first run a scan with a new project name, and then branch the existing project as described here.
public CxWSResponseRunID BranchProjectById( string sessionId, long originProjectId, string newBranchProjectName ); |
CxWSResponseRunID, including:
If there are any errors, the return value parameter “CxWSResponseRunID.IsSuccesfull” is set to false and the second parameter “CxWSResponseRunID.ErrorMessage” indicates the reason for failure.
To branch an existing project with a known ID of 200:
internal void Main(string [] args) { String sessionID = args[0]; CxSDKWebServiceSoapClient cxSDKProxy = new CxSDKWebServiceSoapClient(); //The project unique ID long projectID = 200; CxWSResponseRunID response= cxSDKProxy.BranchProjectById(sessionID, projectID,"NewProjectName"); //project configuration Id Long projectId = response.ProjectID; } |
This section covers SOAP to REST migration and mapping of our legacy SOAP based SDK to the new REST APIs. It is recommended to use this reference only once CxSAST V8.8.0 is installed.
BranchProjectById | POST /projects/{id}/branch | Create a specific project’s branch. Parameters include - name. |
For more mapping information, refer to API Mapping (SOAP to REST). You can also find a summary of our REST APIs here.
|