1 Reply Latest reply on Dec 24, 2019 2:55 AM by patrickkuan

    Problems trying to undeploy vapp using rest api on vcloud director 9.5

    etcheverri Lurker

      Hi , i have a problem , maybe is my fault but:

       

      i am trying to undeploy a vapp and get some weird behavior,

      query : PUT https://myserver/api/vApp/vapp-somenumber/action/undeploy

       

      with the headers:

      Content-Length: 212

      Content-Type: applicatapplication/vnd.vmware.vcloud.undeployVAppParams+xml; charset=ISO-8859-1

      Accept: application/*+xml;version=31.0

      x-vcloud-authorization: somethingsomething

       

      with the body:

      <?xml version="1.0" encoding="UTF-8"?>

      <vcloud:UndeployVAppParams

          xmlns:vcloud="http://www.vmware.com/vcloud/v1.5">

          <vcloud:UndeployPowerAction> force </vcloud:UndeployPowerAction>

      </vcloud:UndeployVAppParams>

       

       

      and i get:

      <?xml version="1.0" encoding="UTF-8" standalone="yes"?>

      <Error

        xmlns="http://www.vmware.com/vcloud/v1.5"

        xmlns:ovf="http://schemas.dmtf.org/ovf/envelope/1"

        xmlns:vssd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_VirtualSystemSettingData"

        xmlns:common="http://schemas.dmtf.org/wbem/wscim/1/common"

        xmlns:rasd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData"

        xmlns:vmw="http://www.vmware.com/schema/ovf"

        xmlns:vmext="http://www.vmware.com/vcloud/extension/v1.5"

        xmlns:ovfenv="http://schemas.dmtf.org/ovf/environment/1"

        xmlns:ns9="http://www.vmware.com/vcloud/versions" majorErrorCode="415" message="Unsupported Media Type" minorErrorCode="UNSUPPORTED_MEDIA_TYPE"/>

       

      Any hints ? somebody? i also tried with bearer token authentication with the same error.