VMware {code} Community
leaderone2
Contributor
Contributor
Jump to solution

How to Get Running Task ID Through Vsphere Webservice

I want to get the running task ID in vcenter server. Because sometimes we need to cancel this task due to some reasons. I know I can use PowerCLI get-task to get this.

Can I get the Running task ID use Webservice? Or other Method, we need to integrate with other system.

Tags (1)
Reply
0 Kudos
1 Solution

Accepted Solutions
joshames
Enthusiast
Enthusiast
Jump to solution

Yes you can.  Have you tried to code it???  What programming language are you using????  You can create a TaskFilterSpec and then query tasks using TaskHistoryCollector.latestpage to query tasks if you don't know the MOREF of the task you are looking for.  Here is a reference:

https://www.vmware.com/support/developer/converter-sdk/conv51_apireference/vim.TaskHistoryCollector....

Josh

View solution in original post

Reply
0 Kudos
2 Replies
joshames
Enthusiast
Enthusiast
Jump to solution

Yes you can.  Have you tried to code it???  What programming language are you using????  You can create a TaskFilterSpec and then query tasks using TaskHistoryCollector.latestpage to query tasks if you don't know the MOREF of the task you are looking for.  Here is a reference:

https://www.vmware.com/support/developer/converter-sdk/conv51_apireference/vim.TaskHistoryCollector....

Josh

Reply
0 Kudos
leaderone2
Contributor
Contributor
Jump to solution

We use BMC Atrium orchestor to invoke webservice or rest api。 seems it use java maybe better

Reply
0 Kudos