Jerry,
There are a few places where things may be confusing. I've posted some
examples below which anyone can run using the admin/admin credentials.
From the Story side, we can see the relationship to Goals using the meta
API:
https://www14.v1host.com/v1sdktesting/meta.v1/Story?xsl=api.xsl
From the Goals side, the relationship is a little less clear:
https://www14.v1host.com/v1sdktesting/meta.v1/Story?xsl=api.xsl
You would have to know the hierarchy of assets: Story is a subtype of
PrimaryWorkitem is a subtype of Workitem
Now armed with the knowledge that it's there, we need to know how to ask
for it -- the default query does not return all attributes and
relationships. So you need to use the "sel=" parameter.
From the Story side, we can ask like this:
https://www14.v1host.com/v1sdktesting/rest-1.v1/Data/Story?sel=Name,N...
(Note: the above query uses the page parameter to make the results come
back quick for testing. You may not want to use paging for your end
purposes but it's a good idea when testing. Also, the stories in the above
result set may not be linked to Goals but you will still see a Goal
relation in the XML.)
From the Goal side, things are again a little more tricky. If we only care
about the Stories linked with Goals, we need to downcast. So we can ask
like this:
https://www14.v1host.com/v1sdktesting/rest-1.v1/Data/Goal?sel=Name,Nu...
Yours truly,
Ian Buchanan
Product Manager for Platform and Integrations
On Wednesday, May 9, 2012 2:48:46 PM UTC-4, Jerry Vasend wrote:
> I am retrieving V1 goals and stories via REST. I have both goals and
> stories defined with at least some of the stories assigned to at least
> one goal. However, when I look at the data extracted, I do not see any
> data that would link the stories to the goals. I have googled this and
> nothing obvious came up. How can I relate goals to stories based on
> data retrieved via REST? I am using ultimate edition from 2011.
> Thanks!
> Jerry