Is it possible to rank artifacts outside of the UI, using Web Services API?
Web Services API documentation in the PUT/POST Parameters section mentions the following parameters that have effect for PUT and POST requests:
Set the value to an object reference url to cause the created/modified object to be ranked in relation to the referenced object.
Example: rankAbove=/slm/webservice/v2.0/defect/<DEFECT_OID>
Example: rankBelow=/slm/webservice/v2.0/defect/<DEFECT_OID>
NOTE: direct setting of alpha-numeric DragAndDrop rank is not supported and does not produce expected results. Only rankAbove and rankBelow endpoints are supported.
Below is an example of ranking one story above the other using curl command in the terminal.
The stories re-ranked in this example have the following URLs:
US2917: https://rally1.rallydev.com/#/<PROJECT_OID>/detail/userstory/<STORY_OID>
US2916: https://rally1.rallydev.com/#/<PROJECT_OID>/detail/userstory/<STORY_OID>
Below is the cURL command, where _abc123 is an ApiKey of the user whose credentials are used to edit the stories:
curl --header "zsessionid:<API Key - include the underscore before the key>" -H "Content-Type: application/json" -d"{\"HierarchicalRequirement\":{}}" https://rally1.rallydev.com/slm/webservice/v2.0/HierarchicalRequirement/<STORY_OID>?rankAbove=/HierarchicalRequirement/<STORY_OID>
Notice the payload: {"HierarchicalRequirement":{}}"