<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Share vApp with other users using REST API in VMware vCloud Director Discussions</title>
    <link>https://communities.vmware.com/t5/VMware-vCloud-Director/Share-vApp-with-other-users-using-REST-API/m-p/2955750#M13450</link>
    <description>&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;Content-Type for your request should be&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt; 'application/vnd.vmware.vcloud.controlAccess+xml'&lt;/P&gt;</description>
    <pubDate>Tue, 21 Feb 2023 10:46:25 GMT</pubDate>
    <dc:creator>Macleud</dc:creator>
    <dc:date>2023-02-21T10:46:25Z</dc:date>
    <item>
      <title>Share vApp with other users using REST API</title>
      <link>https://communities.vmware.com/t5/VMware-vCloud-Director/Share-vApp-with-other-users-using-REST-API/m-p/2955149#M13440</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to utilize REST APIs to share vApp with other users in the org. I wanted to know can we update controlAccess for the vApp if we have other user's email or username?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;I am trying to use the below endpoint.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;https://&amp;lt;cloud-url&amp;gt;/api/vApp/&amp;lt;vapp-id&amp;gt;/action/controlAccess&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And I got this payload example from schema.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{
  "vCloudExtension": [
    {
      "required": true
    }
  ],
  "isSharedToEveryone": true,
  "everyoneAccessLevel": "string",
  "accessSettings": {
    "vCloudExtension": [
      {
        "required": true
      }
    ],
    "accessSetting": [
      {
        "vCloudExtension": [
          {
            "required": true
          }
        ],
        "accessLevel": "string"
      }
    ]
  }
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;They payload doesn't specify how we can pass the user detail. I am not sure if this is the correct endpoint or do we have another endpoint?&lt;/P&gt;&lt;P&gt;Thanks,&lt;BR /&gt;Shukran&lt;/P&gt;</description>
      <pubDate>Fri, 17 Feb 2023 11:15:02 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-vCloud-Director/Share-vApp-with-other-users-using-REST-API/m-p/2955149#M13440</guid>
      <dc:creator>Shukran</dc:creator>
      <dc:date>2023-02-17T11:15:02Z</dc:date>
    </item>
    <item>
      <title>Re: Share vApp with other users using REST API</title>
      <link>https://communities.vmware.com/t5/VMware-vCloud-Director/Share-vApp-with-other-users-using-REST-API/m-p/2955459#M13442</link>
      <description>&lt;P&gt;Hi Shukran.&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;You need to use POST /vApp/{id}/action/controlAccess and add ControlAccessParamsType to it.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;A href="https://vdc-repo.vmware.com/vmwb-repository/dcr-public/76f491b4-679c-4e1e-8428-f813d668297a/a2555a1b-22f1-4cca-b481-2a98ab874022/doc/doc/operations/POST-ControlAccess.html" target="_blank" rel="noopener"&gt;https://vdc-repo.vmware.com/vmwb-repository/dcr-public/76f491b4-679c-4e1e-8428-f813d668297a/a2555a1b-22f1-4cca-b481-2a98ab874022/doc/doc/operations/POST-ControlAccess.html&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;A href="https://vdc-repo.vmware.com/vmwb-repository/dcr-public/76f491b4-679c-4e1e-8428-f813d668297a/a2555a1b-22f1-4cca-b481-2a98ab874022/doc/doc/types/ControlAccessParamsType.html" target="_blank" rel="noopener"&gt;https://vdc-repo.vmware.com/vmwb-repository/dcr-public/76f491b4-679c-4e1e-8428-f813d668297a/a2555a1b-22f1-4cca-b481-2a98ab874022/doc/doc/types/ControlAccessParamsType.html&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;AccessSettings&amp;gt;
        &amp;lt;AccessSetting&amp;gt;
            &amp;lt;Subject href="xs:anyURI" id="xs:string" type="xs:string" name="xs:string"/&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;You will need to specify&amp;nbsp; href, id and username.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Feb 2023 06:56:11 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-vCloud-Director/Share-vApp-with-other-users-using-REST-API/m-p/2955459#M13442</guid>
      <dc:creator>Macleud</dc:creator>
      <dc:date>2023-02-20T06:56:11Z</dc:date>
    </item>
    <item>
      <title>Re: Share vApp with other users using REST API</title>
      <link>https://communities.vmware.com/t5/VMware-vCloud-Director/Share-vApp-with-other-users-using-REST-API/m-p/2955746#M13449</link>
      <description>&lt;P&gt;Hi Macleud,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your help but when I run it I am getting 415 'Unsupported Media Type' error.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;This is the query i have used&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;curl -L -X POST 'https://&amp;lt;cloud-url&amp;gt;/api/vApp/vapp-01417e65-28bc-4eb4-97fa-f4da9a0158f4/action/controlAccess' -H 'accept: application/*;version=33.0' -H 'Content-Type: application/xml' --data-raw '&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;
&amp;lt;ControlAccessParams
    xmlns="http://www.vmware.com/vcloud/v1.5"&amp;gt;
    &amp;lt;IsSharedToEveryone&amp;gt;true&amp;lt;/IsSharedToEveryone&amp;gt;
    &amp;lt;EveryoneAccessLevel&amp;gt;ReadOnly&amp;lt;/EveryoneAccessLevel&amp;gt;
&amp;lt;/ControlAccessParams&amp;gt;'&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the response&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&amp;gt;
&amp;lt;Error xmlns="http://www.vmware.com/vcloud/v1.5" xmlns:rasd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData" 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:vmw="http://www.vmware.com/schema/ovf" xmlns:ovfenv="http://schemas.dmtf.org/ovf/environment/1" xmlns:vmext="http://www.vmware.com/vcloud/extension/v1.5" xmlns:ns9="http://www.vmware.com/vcloud/versions" majorErrorCode="415" message="Unsupported Media Type" minorErrorCode="UNSUPPORTED_MEDIA_TYPE"/&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Not sure if I am doing something wrong. If you have a curl that i could use that would be appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Shukran&lt;/P&gt;</description>
      <pubDate>Tue, 21 Feb 2023 10:29:51 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-vCloud-Director/Share-vApp-with-other-users-using-REST-API/m-p/2955746#M13449</guid>
      <dc:creator>Shukran</dc:creator>
      <dc:date>2023-02-21T10:29:51Z</dc:date>
    </item>
    <item>
      <title>Re: Share vApp with other users using REST API</title>
      <link>https://communities.vmware.com/t5/VMware-vCloud-Director/Share-vApp-with-other-users-using-REST-API/m-p/2955750#M13450</link>
      <description>&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;Content-Type for your request should be&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt; 'application/vnd.vmware.vcloud.controlAccess+xml'&lt;/P&gt;</description>
      <pubDate>Tue, 21 Feb 2023 10:46:25 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-vCloud-Director/Share-vApp-with-other-users-using-REST-API/m-p/2955750#M13450</guid>
      <dc:creator>Macleud</dc:creator>
      <dc:date>2023-02-21T10:46:25Z</dc:date>
    </item>
    <item>
      <title>Re: Share vApp with other users using REST API</title>
      <link>https://communities.vmware.com/t5/VMware-vCloud-Director/Share-vApp-with-other-users-using-REST-API/m-p/2955752#M13451</link>
      <description>&lt;P&gt;Thanks it works now&lt;/P&gt;</description>
      <pubDate>Tue, 21 Feb 2023 10:56:52 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-vCloud-Director/Share-vApp-with-other-users-using-REST-API/m-p/2955752#M13451</guid>
      <dc:creator>Shukran</dc:creator>
      <dc:date>2023-02-21T10:56:52Z</dc:date>
    </item>
  </channel>
</rss>

