我試圖通過V1 API創建新的Story資產。我收到一個錯誤:VersionOne .NET SDK創建新資產
「未處理的異常:VersionOne.SDK.APIClient.ConnectionException:錯誤寫 到輸出流---> System.Net.WebException:遠程服務器返回一個ER ROR:(400 )錯誤的請求---> VersionOne.SDK.APIClient.APIException:Violation'Re quired'AttributeDefinition'Super'Story」
我設置我的連接器和創建像這樣的資產:
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);
發生錯誤在最後一行。我一直試圖弄清楚這一點,我還沒有想出一個解決方案。有人有建議嗎?
這裏是我試圖效仿的鏈接:https://community.versionone.com/VersionOne_Connect/Developer_Library/Get_an_SDK/.NET_SDK/Creating_Assets