We have created and closed a large number of Projects in Rally over the years. Because you can't actually delete Projects entirely, I've found the need to re-open the closed Projects, modify some artifacts, and reclose the project. A simple example of what I'm trying to do is reflected in this bit of Python:
resp = session.get('https://rally1.rallydev.com/slm/webservice/v2.0/project/' + ObjectID, auth=HTTPBasicAuth(user, password))
state = resp.json()["Project"]["State"]
if state == "Closed":
info = { "State": "Open" }
resp = session.post('https://rally1.rallydev.com/slm/webservice/v2.0/project/' + ObjectID + '?key=' + token, auth=HTTPBasicAuth(user, password), data=json.dumps(info))
print resp.content
So if a project's "State" is "Closed", POST a JSON object to the API URL of the Project setting it to "Open".
It doesn't work. I get this response:
{
"OperationResult": {
"Errors": [
"Cannot set attribute on a com.rallydev.webservice.json.JSONSingleProperty"
],
"Warnings": [],
"_rallyAPIMajor": "2",
"_rallyAPIMinor": "0"
}
}
Is there another way to open/close a Project via the Rally WS API?