1

The Agile Central (Rally) WSAPI documentation schema section says I can get the schema like this:

There is an optional hash for the schema request. If it is not provided, the service will determine the hash and redirect the request internally. Requesting a hash that is no longer current will redirect to the current hash. Schema request by project (service figures out the workspace): rally1.rallydev.com/slm/schema/v2.0/project/[ObjectID]/[Hash]

I need a consistent way to fetch the schema without redirection. I don't know what to enter for [Hash] in order to make a reliable schema end-point. I've noticed the auto-generated value of [Hash] expires at some interval.

How do I append a hash to get a consistent schema? There are no examples in the documentation, so what does the hash look like? Something like this?

rally1.rallydev.com/slm/schema/v2.0/project/12345/{"showMeTheModels": true}

or like this?

rally1.rallydev.com/slm/schema/v2.0/project/12345/99999999

Where 12345 is my Project ID and 99999999 is an arbitrary number I chose / generated by myself.

Thanks in advance!

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62

1 Answers1

0

That hash value is available via the SchemaVersion attribute on either the Project or Workspace you are scoping the schema to. If you're writing an app the App SDK already does this for you as part of building models with the ModelFactory.

Otherwise the general process is:

1) Do a read on /project/12345?fetch=SchemaVersion
2) Do a read on /schema/v2.0/project/12345/[schemaversionfromstep1]

Kyle Morse
  • 8,390
  • 2
  • 15
  • 16
  • Thank you. Your explanation really should be in the docs. I still don't understand what was happening though. My AJAX calls had been doing reads on **/schema/v2.0/project/12345/** omitting "hash." (I tried the same thing just by typing the URL in the browser). Is omitting "hash" the thing that causes what causes a randomized "hash" that expires to be appended after project ID? – AmyLoves2Code Aug 03 '17 at 18:19
  • I agree. There are a bunch of other things that would be great to have in there too- batch endpoint, advanced fetching/sorting/filtering, etc. – Kyle Morse Aug 03 '17 at 18:29
  • The "randomized" hash that it redirects you should be the value of that SchemaVersion for that project. As far as I know they are valid until either we deploy and roll our app servers (about 1x per day) or if anyone changes the schema at that scope- add a field, change visibility/requiredness, etc. – Kyle Morse Aug 03 '17 at 18:31
  • Gotcha. Thanks so much for the additional info. I'm confined to the QT based browser that lives inside the Tableau Desktop app. It doesn't seem to handle AJAX w/ redirect so I kept getting empty set. I'm using the programmatic way you described to guarantee a correct URL and it's working great! – AmyLoves2Code Aug 03 '17 at 23:00