VMware {code} Community
rxajoemorrison
Contributor
Contributor

Using the appropriate API for C#

Hey all smart people out there!  I am hoping to get help regarding some C# tasks. 

Can someone please let me know which API I should be using to get Task info out of vCenter and into my own database?  I was thinking of creating a Windows service and using it to suck out the task info and into my own data format so I can view history, etc.  I'm getting confused between VIX, Vim25Api, VMware.API, etc. 

I'm a Systems guy, but I like to write my tools in C#.  I am not a programmer, but I can work my way through a lot of these things.  This one, however, is just getting so confusing.  I can get a list of VMs and their status from the VMware.Vim API easily enough, but when I dig into it to get Task and Event info, I get lost.

Thanks!

Joe

Reply
0 Kudos
2 Replies
lemke
VMware Employee
VMware Employee

You don't want VIX.  Its been deprecated, and it never exposed Tasks or Events.

Reply
0 Kudos
rxajoemorrison
Contributor
Contributor

For anyone else looking for this answer, I think I have it.  Use the vSphere SDK to build the samples per their instructions (Not trivial).  Then reference those in your application.  For me it was Vim25service.dll and Vim25XmlSerializers.dll.  There is also an AppUtil.dll that was required.  Then I copied code from "CreateEventHistoryCollector" project and modified it appropriately.  Now I'm able to access event history objects.  Now to write the windows service that pulls the data out and puts it into a SQL database for viewing in another app. Hopefully this helps someone.

Cheers,

Joe

Reply
0 Kudos