Reputation: 21
I’m trying to use the Rally Java REST API - https://github.com/RallyTools/RallyRestToolkitForJava. How can I create a new project in my defined workspace? I am not able to find anything useful, any help would be much appreciated.
By referring the documentation, i tried the below code, but the project is not created in the Rally
RallyRestApi rallyService = new RallyRestApi(new URI(rallyURL), userName, password);
rallyService.setApplicationName("RallyRestExample");
rallyService.setWsapiVersion("v2.0");
JsonObject newProject = new JsonObject();
newProject.addProperty("Name", "Rally Rest Sample");
newProject.addProperty("Description", "Java Rally Rest API");
newProject.addProperty("State", "Open");
newProject.addProperty("Owner", "Karthi");
newProject.addProperty("Workspace", "/workspace/XXX");
CreateRequest createRequest = new CreateRequest("Project", newProject);
CreateResponse createResponse = rallyService.create(createRequest);
Thanks Karthi
Upvotes: 1
Views: 954
Reputation: 347
I think you should not use the property newProject.addProperty("Workspace", "/workspace/XXX");
and newProject.addProperty("Owner", "Karthi");
with values like "/workspace/XXX"
and "Karthi"
. Instead you need to provide it with the object ID of respective workspace and owner.
Upvotes: 0
Reputation: 5148
There is a user guide in GitHub here. This walks you through how to set up a project and how to use methods provided to you by the API.
There is also full API Documentation here.
On the GitHub page, it also gives you a link to the Web Services API documentation, but you will need a Rally login to view this.
RallyRestApi restApi = new RallyRestApi(new URI("https://rally1.rallydev.com"), "[email protected]", "password");
Then use restApi
to use the provided methods from the documentation.
Upvotes: 2