Ok, i understand how to insert a Task and associate it with a User Story, but now how do I insert a User Story and associate it with a Workspace and Project. Here is what i have so far..
DynamicJsonObject toCreate = new DynamicJsonObject();
toCreate["Name"] = "My Test User Story";
toCreate["Description"] = "This is the description of the test User Story";
// these do not exist
//toCreate["Iteration.Name"] = "Iteration Name";
//toCreate["Workspace.ObjectID"] = "123456";
//toCreate["Project.ObjectID"] = "456789";
CreateResult createResult = _restApi.Create("hierarchicalrequirement", toCreate);
bool success = createResult.Success;
I tried this and it worked!
So, you have to use references. Hope this helps others!