Highlighted
Contributor
Contributor

How to Get Running Task ID Through Vsphere Webservice

Jump to solution

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)
0 Kudos
1 Solution

Accepted Solutions
Highlighted
Enthusiast
Enthusiast

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

0 Kudos
2 Replies
Highlighted
Enthusiast
Enthusiast

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

0 Kudos
Highlighted
Contributor
Contributor

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

0 Kudos