This is a follow-on question from "Adding a VersionOne expression using the REST API"...
I am trying to add an Expression (comment) to a story in VersionOne. I can now do this (with some help - see original post), but I have a related question:
In VersionOne, each Story has a Number (e.g. "B-01123") and a Name (e.g. "Fix ProcVars REST functionality"). It can be queried on these things using e.g:
<Server Base URI>/rest-1.v1/Data/Story?sel=Name,Number&where=Number='B-01123'
However, internally, all VersionOne assets have an OID - for instance, the above story might have an OID of "Story:2017". This is the unique asset identifier.
It appears that to add an Expression or a Link to a Story, you need to know the OID of the Story, because when adding something, you need to typically include the following the in the POSTed XML:
<Relation name="Asset" act="set">
<Asset href="<Server Base URI>/rest-1.v1/Data/Story/2017" idref="Story:2017" />
</Relation>
Of course, you can perform a query (like the above) to get an XML response which includes the OID, and then parse it out from the XML and pass it in a new request. However, this is a two-part task, and is a huge hassle.
Is it possible to e.g. add a Link or an Expression to a Story where all you know is the Story Number (the user-visible bit)?