c# - VersionOne API Client not recognizing asset types? -


i running problem versiononeapiclient in not recognize give ass asset type. understand attribute definitions don't make sense i've been trying pretty everything. end goal query teamrooms , team names teams in team room.

it's understanding documentation on asset types , how query should work that's say.

i using: c# asp.net, versiononeapiclient 15.0.0.0

strings have tried:

  • teamroom
  • task
  • scope
  • project

        public bool apigetteams() {     iassettype teamroomtype = services.meta.getassettype("task");     query query = new query(teamroomtype);     iattributedefinition teamattribute = teamroomtype.getattributedefinition("children:room.team.name");     query.selection.add(teamattribute);     iattributedefinition scheduleattribute = teamroomtype.getattributedefinition("children:scope.room.schedule.name");     query.selection.add(scheduleattribute);     query.find = new queryfind(schedulename, new attributeselection(scheduleattribute));     query.paging.pagesize = 1;     query.paging.pagesize = 0;     teamroomasset = (asset)services.retrieve(query).assets.toarray().getvalue(0);      return true; }   

my definition of services , connector:

        public static v1connector connector = v1connector            .withinstanceurl("http://versionone.cscinfo.com/versiononeprod/")            .withuseragentheader("new dashboard?", "1.0")            .withwindowsintegrated()            .build();     public iservices services = new services(connector); 

and these errors / stack traces: error server error meta stack trace

the error simple , right in face can't figure out.

you have couple of things going on here. address statement "my end goal query teamrooms , team names teams in team room."

here working chunk of code reads of teamrooms , prints name of team room , team name. once working on machine, attempt paging. add filtering incrementally keep debug cycles low.

 static void main(string[] args)     {          v1connector connector = v1connector             .withinstanceurl("https://www.myv1instance")             .withuseragentheader("happyapp", "0.1")             .withusernameandpassword("login", "pwd")             .build();           iservices services = new services(connector);          iassettype trtype = services.meta.getassettype("teamroom");         query query = new query(trtype);         iattributedefinition teamattribute = trtype.getattributedefinition("team.name");         iattributedefinition nameattribute = trtype.getattributedefinition("name");         query.selection.add(teamattribute);         query.selection.add(nameattribute);           queryresult result = services.retrieve(query);         asset teamrooms = result.assets[0];          foreach (asset story in result.assets)         {             console.writeline(story.oid.token);             console.writeline(story.getattribute(teamattribute).value);             console.writeline(story.getattribute(nameattribute).value);             console.writeline();         } 

addendum

i realized using withwindowsintegrated() instead of withusernameandpassword().

just change in sample confirm logged machine member setup in versionone. windows int auth trusting iis' decision trust after allowing auth, have have active member account in versionone have access versionone assets.


Comments

Popular posts from this blog

javascript - oscilloscope of speaker input stops rendering after a few seconds -

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -