You can update an object extension registration by making a PUT request to its edit URL and supplying a modified an ObjectExtension in the request body.
Note: This procedure is deprecated. To create an external service, see the
VMware Cloud Director OpenAPI reference.
Prerequisites
This operation is restricted to system administrators.
Procedure
Example: Update an Object Extension
This example updates the object extension created in Register an Object Extension to enable it by setting the value of Enabled to true
.
Request:
PUT https://vcloud.example.com/api/admin/extension/object Content Type: application/vnd.vmware.admin.extensibility.object+xml ... <?xml version="1.0" encoding="UTF-8"?> <ObjectExtension xmlns="http://www.vmware.com/vcloud/extension/v1.5" xmlns:vcloud_v1.5="http://www.vmware.com/vcloud/v1.5"> <Namespace>vcdx.vmdeploy</Namespace> <Enabled>true</Enabled> <Exchange>example-exchange</Exchange> <Vendor>com.example</Vendor> <Selectors> <Selector name="urn:selector:providerVdc" /> </Selectors> </ObjectExtension>
The system updates the extension and returns an updated ObjectExtension element similar to the one shown in Register an Object Extension.
Response:
200 OK Content Type: application/vnd.vmware.admin.service+xml ... <vmext:ObjectExtension xmlns:vmext="http://www.vmware.com/vcloud/extension/v1.5" xmlns:vcloud="http://www.vmware.com/vcloud/v1.5" id="83...0d39" href="https://vcloud.example.com/api/admin/extension/object/83...0d39" > ... <vmext:Namespace>example-object</vmext:Namespace> <vmext:Enabled>true</vmext:Enabled> <vmext:Exchange>example-exchange</vmext:Exchange> <vmext:ContentType>XML</vmext:ContentType> <vmext:Vendor>com.example</vmext:Vendor> ... </vmext:ObjectExtension>