Skip to content

Instantly share code, notes, and snippets.

@ssbarnea
Last active August 29, 2015 14:02
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save ssbarnea/bcce8a825f243f8c6c34 to your computer and use it in GitHub Desktop.
...
for r in rally.get("User Story', fetch=True, query=""):
full_resource_url = "%s/analytics/v2.0/service/rally/workspace/%s/artifact/snapshot/query.js" % ("https://rally1.rallydev.com", r.Workspace.oid)
item = {
"find": {
"ObjectID": r.oid
},
"fields": ["State", "ScheduleState", "_ValidFrom", "_ValidTo", "ObjectID", "FormattedID"],
"hydrate": ["State"],
"compress": True
}
payload = json.dumps(item)
response = rally.session.post(full_resource_url, data=payload, headers=RALLY_REST_HEADERS)
response_dic = json.loads(response.content)
if response_dic['TotalResultCount'] != 0:
for result in response_dic['Results']:
print result
else:
logging.info("-- no revisions for %s (%s)" % (r.FormattedID, r.oid))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment