SaveAsProject
Description
The SaveAsProject method sends a request to work on a copy of the current project.
Parameters
- Name (required): The name of the NeoLoad project.
- DirectoryPath (optional): The location of the project. By default projects are created in NeoLoad projects folder.
- Overwrite (optional): Default value is false. If set to true, an existing project with the same name and location is deleted.
- ForceStop (optional): Default value is false. If set to true, running tests and recordings are stopped.
- ApiKey (optional): To authenticate the command. Required if enabled on the Controller.
REST example
POST http://localhost:7400/Design/v1/Service.svc/SaveAsProject HTTP/1.1Accept: application/jsonContent-Type:application/jsonCache-Control:nocachePragma: nocacheUser-Agent:Java/1.7.0_10Host: localhost:7400Connection: keepaliveContent-Length:102{"d": {"Name": "my_copy","DirectoryPath": "C:\\Users\\apaul\\backup","ForceStop": true}}Use case with Command Line Designer
java -cp "api/Common/java/*;api/Design API Client/java/*" com.neotys.rest.design.client.CommandLineDesigner -designAPIURL http://localhost:7400/Design/v1/Service.svc/ -command SaveAsProject -Name my_copy -DirectoryPath "C:\\Users\\apaul\\backup" -ForceStop trueUse case with Java Client Designer
import com.neotys.rest.design.client.DesignAPIClient;import com.neotys.rest.design.client.DesignAPIClientFactory;import com.neotys.rest.design.model.SaveAsProjectParams.SaveAsProjectParamsBuilder;public class Main {public static void main(String[] args) throws Exception {final String url = "http://localhost:7400/Design/v1/Service.svc";final DesignAPIClient client = DesignAPIClientFactory.newClient(url);client.saveAsProject(new SaveAsProjectParamsBuilder().name("my_copy").forceStop(true).directoryPath("C:\\Users\\apaul\\backup").build());}}Use case with C#Client
using Neotys.DesignAPI.Client;using Neotys.DesignAPI.Model;namespace Design{class SaveAsProject{static void Main(string[] args){string url = "http://localhost:7400/Design/v1/Service.svc/";IDesignAPIClient client = DesignAPIClientFactory.NewClient(url);client.SaveAsProject(new SaveAsProjectParamsBuilder().name("my_copy").forceStop(true).directoryPath("C:\\Users\\apaul\\backup").Build());}}}
Home