I am trying to create a new Story asset through the V1 API. I am receiving an error:
"Unhandled Exception: VersionOne.SDK.APIClient.ConnectionException: Error writing to output stream ---> System.Net.WebException: The remote server returned an er ror: (400) Bad Request. ---> VersionOne.SDK.APIClient.APIException: Violation'Re quired'AttributeDefinition'Super'Story"
I am setting up my connector and creating the asset like so:
V1Connector connector = V1Connector
.WithInstanceUrl("xxx")
.WithUserAgentHeader("NewApp", "1.0")
.WithAccessToken("xxx")
.UseOAuthEndpoints()
.Build();
IServices services = new Services(connector);
Oid projectId = services.GetOid("Scope:02284");
IAssetType storyType = services.Meta.GetAssetType("Story");
Asset newStory = services.New(storyType, projectId);
IAttributeDefinition nameAttribute = storyType.GetAttributeDefinition("Name");
newStory.SetAttributeValue(nameAttribute, "My New Test Story");
services.Save(newStory);
The error is given on the last line. I've been trying to figure this out for a while and I haven't come up with a solution. Does anybody have suggestions?
Here is a link to the example I am trying to follow: https://community.versionone.com/VersionOne_Connect/Developer_Library/Get_an_SDK/.NET_SDK/Creating_Assets