All Posts

Hi, I'm facing an issue with the vCloud API using JSON. I'm trying to update a virtual machine disk. When I retrieve the GET /vApp/{id}/virtualHardwareSection/disks I get in the Hard Disk ... See more...
Hi, I'm facing an issue with the vCloud API using JSON. I'm trying to update a virtual machine disk. When I retrieve the GET /vApp/{id}/virtualHardwareSection/disks I get in the Hard Disk 1 item the following hostresource     "hostResource" : [ {       "value" : "",       "otherAttributes" : {         "{http://www.vmware.com/vcloud/v1.5}storageProfileHref" : "https://exampledomain.com/api/vdcStorageProfile/61fe5387-8551-4fs9-927f-dd1b63a82b26",         "{http://www.vmware.com/vcloud/v1.5}busType" : "6",         "{http://www.vmware.com/vcloud/v1.5}busSubType" : "VirtualSCSI",         "{http://www.vmware.com/vcloud/v1.5}capacity" : "10240",         "{http://www.vmware.com/vcloud/v1.5}iops" : "0",         "{http://www.vmware.com/vcloud/v1.5}storageProfileOverrideVmDefault" : "false"       }     } ], now updating the value of the "{http://www.vmware.com/vcloud/v1.5}capacity" and sending it back with a PUT request I get the following error message: {   "otherAttributes" : { },   "tenantError" : null,   "stackTrace" : null,   "majorErrorCode" : 400,   "message" : "'capacity' attribute expected for element HostResource for rasd item with InstanceID=2000",   "minorErrorCode" : "BAD_REQUEST",   "vendorSpecificErrorCode" : null,   "vcloudExtension" : [ ] } Is there anything I'm missing? Thanks in advanced. Housam Smadi
I'm trying to to do the exact same thing the OP has attempted (obviously years ago). I'm able to authenticate with the API and send the GET for " https://my.vcd.cells/api/query?type=externalNe... See more...
I'm trying to to do the exact same thing the OP has attempted (obviously years ago). I'm able to authenticate with the API and send the GET for " https://my.vcd.cells/api/query?type=externalNetwork ", but for some reason I seem to be only getting a subset of the External Networks in my environment. Any ideas what I'm doing wrong? It's worth noting that until half an hour I had never even authenticated with the vCD API, let alone obtained any useful information using it. I'm running vCD 9.1 and using version 30 of the API. I have 39 external networks in vCD. My XML output for the GET only lists 25 networks.
I was looking through the apiexplorer (https://<vcenter>/apiexplorer) on my VCSA 6.7 update 1 appliance, and came across GET /appliance/system/storage , however when I use the 'try it' in the swa... See more...
I was looking through the apiexplorer (https://<vcenter>/apiexplorer) on my VCSA 6.7 update 1 appliance, and came across GET /appliance/system/storage , however when I use the 'try it' in the swagger UI, I get an error    type": "com.vmware.vapi.std.errors.error", I'm guessing the `GET /appliance/system/storage` should map to `com.vmware.appliance.version1.resources.storage.stats.list` but this doesn't appear to be the case in the swagger UI. Is this intentional or a bug?
i have same question.can someone help us?
vSphere 6.0 did not have, to my knowledge, any RESTful API available. EDIT: It was limited to Content Library and Tagging in 6.0. It was further expanded in 6.5 to encompass basic VM workflows... See more...
vSphere 6.0 did not have, to my knowledge, any RESTful API available. EDIT: It was limited to Content Library and Tagging in 6.0. It was further expanded in 6.5 to encompass basic VM workflows as indicated here. The error message you see (or saw) indicates that resource is not available.
hespino2​: The client has no immediate plans, that I know of, to upgrade to vSphere 6.5. (Google translate is really handy.)
Does anyone know if its possible to inspect XML payloads for operations performed via the FlexUI? I'm trying to create an external network via the API, the documented solution does not work so tr... See more...
Does anyone know if its possible to inspect XML payloads for operations performed via the FlexUI? I'm trying to create an external network via the API, the documented solution does not work so trying to find the XML it sends. Its not possible to create an external network via the HTML5 interface.
I'm having trouble creating an external network in vCloud director. My XML must be wrong but I can't figure out where. I am performing a POST with this XML and get a HTTP 400 (Bad Request) error,... See more...
I'm having trouble creating an external network in vCloud director. My XML must be wrong but I can't figure out where. I am performing a POST with this XML and get a HTTP 400 (Bad Request) error, can anyone see where I am going wrong? $xml = '<?xml version="1.0" encoding="UTF-8"?>     <vmext:VMWExternalNetwork    xmlns:vmext="http://www.vmware.com/vcloud/extension/v1.5"    xmlns:vcloud="http://www.vmware.com/vcloud/v1.5"    name="test-extnet"    type="application/vnd.vmware.admin.vmwexternalnet+xml">    <vcloud:Description>Test-extnet</vcloud:Description>    <vcloud:Configuration>       <vcloud:IpScopes>          <vcloud:IpScope>             <vcloud:IsInherited>false</vcloud:IsInherited>             <vcloud:Gateway>10.67.68.1</vcloud:Gateway>             <vcloud:Netmask>255.255.255.0</vcloud:Netmask>             <vcloud:Dns1>10.67.68.2</vcloud:Dns1>             <vcloud:Dns2>10.67.68.3</vcloud:Dns2>             <vcloud:DnsSuffix>test.com</vcloud:DnsSuffix>          </vcloud:IpScope>       </vcloud:IpScopes>       <vcloud:FenceMode>isolated</vcloud:FenceMode>    </vcloud:Configuration>    <vmext:VimPortGroupRef>       <vmext:VimServerRef          href="https://myvcdURL/api/admin/extension/vimServer/9" />       <vmext:MoRef>dvportgroup-123</vmext:MoRef>       <vmext:VimObjectType>DV_PORTGROUP</vmext:VimObjectType>    </vmext:VimPortGroupRef> </vmext:VMWExternalNetwork>'
Hola que tal?, te cuento que a mi me pasa lo mismo, pero descubri que al realizar la misma consulta pero a una Vcenter con version 6.5, esta funciona como debe. Estoy verificando com solucionar e... See more...
Hola que tal?, te cuento que a mi me pasa lo mismo, pero descubri que al realizar la misma consulta pero a una Vcenter con version 6.5, esta funciona como debe. Estoy verificando com solucionar esto. Te contare si se de algo. Saludos. Heber.
My company is a cloud services company and is implementing vCloud Director.   We've worked with vmware products in the past, including some legacy code that leverages the old SOAP API But I'm lo... See more...
My company is a cloud services company and is implementing vCloud Director.   We've worked with vmware products in the past, including some legacy code that leverages the old SOAP API But I'm looking to see what we can do to leverage the modern vCloud REST API.   To that end, I'd like to build a service for our CMS that can make calls to the API. Our CMS is written using Symfony (v.4, and with PHP7).  It looks like the vCloud SDK for PHP is pretty outdated (for API 5.5, and we're on API 31.0 as of 10.10.18). Has any developer here: 1)  Gotten the old SDK to work with a newer API version (maybe with a fork?) 2)  Spec'd out the changes required to update the API? I expect that I'll eventually have to do one of these myself at some point if there isn't an off the shelf answer.
I finally found the right command (the new arguments in bold and green) : curl -kv -X POST --header 'Content-Type: application/json' --header 'Accept: text/html' --header "Authorization: $AUTH... See more...
I finally found the right command (the new arguments in bold and green) : curl -kv -X POST --header 'Content-Type: application/json' --header 'Accept: text/html' --header "Authorization: $AUTH" https://VRA-NODE/workitem-service/api/workitems/WORKITEM-ID/actions/com.vmware.csp.core.approval.action.approve -d @JSON-FILE For the autorization part, I use the variable that stores my bearer token. For the JSON part, instead of "-d "blablabla" " I chose to attach a file. As I did not find any JSON template for my need I used the template for approving a machine request and cleaned it up as shown below (In bold, what is seems to be needed) : {    "formData": {       "entries": [          {             "key": "source-businessJustification",             "value": {                "type": "string",                "value": "Destroy request approved via vRA REST API"             }          }     ]    },    "workItemId": "WORKITEM-ID",    "workItemActionId": "com.vmware.csp.core.approval.action.approve"   }
Hi, Thank you for your answer. I would like to do it with curl first. Regarding the authentication, I thought that my bearer token could do the trick. To explain, as I had an error in vRO,... See more...
Hi, Thank you for your answer. I would like to do it with curl first. Regarding the authentication, I thought that my bearer token could do the trick. To explain, as I had an error in vRO, I wanted to check the command with CURL too and now, I would like to understand what is going wrong with a command that is proposed in VMware vRealize Automation API Explorer...
You'll need to use an authorization token in your request for this it sounds like.  Many api's have calls that require no authorization.  You should be using the vRO plugin for vRA to accomplish ... See more...
You'll need to use an authorization token in your request for this it sounds like.  Many api's have calls that require no authorization.  You should be using the vRO plugin for vRA to accomplish this task.  Generally speaking you can use the actions and scriptable objects provided in the plugin but if something is missing you can also make direct api calls as well.  The plugin will handle the authentication piece for you.
Hi there, First of all, I apologize if I am not using the right place to discuss about my issue (did not find anything related to API issue in the vRealize Automation forum). I am trying to... See more...
Hi there, First of all, I apologize if I am not using the right place to discuss about my issue (did not find anything related to API issue in the vRealize Automation forum). I am trying to create a workflow to reject/approve any destroy related requests. I am able to run a simple GET request but when it comes to a POST one, I receive a http 401 message. I tried to run the curl command from a standalone linux station, our standalone vro instance and even from vra. Always the same result. I first tried to use the VMware vRealize Automation API Explorer available on the vRA appliance to format my request but got a http 404. vRealize Automation API documentation 7.4 seems to not be up to date. I had to use workitem-service instead of work-item-service in my request. My request is the following : curl -v -k -X POST --header 'Content-Type: application/json' --header 'Accept: text/html' -d "nope" https://VRA-FQDN/workitem-service/api/workitems/WORKITEMID/actions/com.vmware.csp.core.approval.action.reject A GET on the same workitem runs without any problem. Has somebody already faced this issue ? Many thanks in advance
Hi, I am trying to show web console of a VM using HTML console SDK. For conneting div with VM, I found this document. Showing Web Console of a VM via vSphere HTML Console SDK · GitHub I... See more...
Hi, I am trying to show web console of a VM using HTML console SDK. For conneting div with VM, I found this document. Showing Web Console of a VM via vSphere HTML Console SDK · GitHub I applied third way but It doesn't work. I got an error below. Here is my code. And My vSphere version is 6. How can I fix it???
Please provide API end point for getting the monthly billing info of the organisations and subscription on VMC on AWS.
Hi All, Can you please assist with the following query? I'd like to list all vAPPs per Org vDC and the users/permissions of each vAPP Thanks!
After trying to follow this (vSphere Automation REST API Postman Resources and Samples - Samples - VMware {code} ) and this (Kyle Ruddy - Get Started Making vSphere API Calls the Easy Way with Po... See more...
After trying to follow this (vSphere Automation REST API Postman Resources and Samples - Samples - VMware {code} ) and this (Kyle Ruddy - Get Started Making vSphere API Calls the Easy Way with Postman - YouTube ) I am stuck. I have been able to install Postman, import the JSON files, create a environment for vSphere (vCenter Server Appliance 6.0 Update 3c build 7037393) (using FQHN) and authenticate. The result from the Login is: {     "value": "214c5126c0ff010024798b861374b708" } ... and a "vmware-api-session-id" cookie has been created. So far, so good. The problem is that if I now try something simple like get a list of datacenters|hosts|vms then the result is always: {     "name": "com.vmware.vapi.rest.httpNotFound",     "localizableMessages": [         {             "defaultMessage": "Not found.",             "id": "com.vmware.vapi.rest.httpNotFound"         }     ],     "majorErrorCode": 404 } I have tried both "Inherit from parent" and "Basic" for Authorization TYPE. In both cases the results are the same. The credentials I am using allow me to login to the Web Client with no problems. What else can/should I try?
No, please go back and read the documentation.
I can login "https://dr4c1jco728bur5.nj.vcenter.com/"  user:administrator@vsphere.local  pass: XXXXXXXX Does this have anything to do with token?