VMware Cloud Community
pprandive
Contributor
Contributor

What would be the best approach to understand the vCenter APIs getting called when we open and use vCenter webclient UI in web browser?

Hi,

I need to know what all APIs get called when one calls the vCenter web UI (e.g., using the URL- https://<IP of vCenter Machine>/vsphere-client/?csp​) and then performs other operations like "Power On/Off VM" etc.

One of the way I am trying out is by using of Nginx reverse proxy. Using Nginx I could capture the HTTPS traffic going to vCenter and I came to know that the communication happens using AMF protocol. However, I could not identify the exact vCenter API which is responsible for serving a particular request. The HTTP request contents are found to be flex messages. By directly looking at these contents I am not getting any sense out of it.

So, in order to know the meaningful APIs related details, I tried to extract AMF messages from HTTP request/response and then deserialize (decode) those.

I tried to google for the ready-made tool for achieving this, but all in-vain. Opensource tools explored so far are flex-blazeds, blazer. Also, used Charles.

With Charles, I set it up as reverse proxy and then captured traffic. With Charles, I am getting below error-

WARNING  com.xk72.charles.gui.transaction.viewers.lib.Abstrac  com.xk72.amf.AMFException: Unsupported AMF3 packet type 22 at 1

com.xk72.amf.AMFException: Unsupported AMF3 packet type 22 at 1

        at com.xk72.amf.tjZk.GyLP(Unknown Source)

        at com.xk72.amf.tjZk.QNfW(Unknown Source)

        at com.xk72.amf.rpc.AMFRPC.xUFT(Unknown Source)

        at com.xk72.amf.rpc.AMFRPC.xUFT(Unknown Source)

        at com.xk72.charles.gui.transaction.viewers.amf.iFaq.PcqR(Unknown Source)

        at com.xk72.charles.gui.transaction.viewers.lib.PtVD.obIG(Unknown Source)

        at com.xk72.charles.gui.transaction.viewers.lib.PtVD.xUFT(Unknown Source)

        at com.xk72.charles.gui.transaction.viewers.lib.vIQL.run(Unknown Source)

        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

        at java.lang.Thread.run(Thread.java:745)

With Blazer code used for de-serializing AMF messages, I am getting below error-

[!] Blazer extractAM Exception: flex.messaging.MessageException: Unsupported AMF version 23,672.

So, can anyone help me in finding the correct approach?

Also, it would be great if you could let me know what is the difference between calls made through vSphere client PyVmomi and the those made by webclient?

Aren't the same APIs used for accessing vCenter through user written programs and through webclient? Are they different?

Hoping to receive positive response.

Thanks and Regards,

Prafulla

0 Kudos
1 Reply
parmarr
VMware Employee
VMware Employee

Hello,

Please refer to the link below to see if it answers your questions about the API's:

vCenter Server Appliance Management SDK Documentation

Sincerely, Rahul Parmar VMware Support Moderator
0 Kudos