VMware Cloud Director 10.6.1.x
The VMware Cloud Director OpenAPI Create Catalog Content Source request can be used to create a VMware Marketplace resource.
The VMware Cloud Director OpenAPI Update Access Control Grants request can be used to share the configured VMware Marketplace resources with tenant organizations after it has been created.
Example steps would be as follows:
<marketplace_api_token> value in the API calls below.X-VMWARE-VCLOUD-ACCESS-TOKEN authentication token value for use in the subsequent API calls.curl -ksSL -D - -X POST https://<vcd_address>/cloudapi/1.0.0/sessions/provider -H "Accept: application/json;version=39.1" -u "administrator@system"X-VMWARE-VCLOUD-ACCESS-TOKEN response:X-VMWARE-VCLOUD-ACCESS-TOKEN: <vcd_token>urn:vcloud:org:a93c9db9-7471-3192-8d09-a8f7eeda85f9 and urn:vcloud:user:07e746aa-1835-39f8-962a-717e352f5c6a are present in all Cloud Director installs and are not unique to a specific instance.https://eapi.broadcom.com/vcf/vsc/gtw/api/v1.description, name, and apiToken need to be customised.{ "url": "https://eapi.broadcom.com/vcf/vsc/gtw/api/v1", "description": "<description>", "sourceType": "VmwareMarketplace", "orgId": "urn:vcloud:org:a93c9db9-7471-3192-8d09-a8f7eeda85f9", "owner": { "name": "system", "id": "urn:vcloud:user:07e746aa-1835-39f8-962a-717e352f5c6a" }, "name": "<name>", "apiToken": "<marketplace_api_token>"}contentsource.json.curl -kv -X POST https://<vcd_address>/cloudapi/1.0.0/catalogContentSources -H 'Accept: application/json;version=40.0.0-alpha' -H 'Content-Type: application/json' -H 'Authorization: Bearer <vcd_token>' -d @contentsource.json201 Createdcurl -k -X GET https://<vcd_address>/cloudapi/1.0.0/catalogContentSources -H 'Accept: application/json;version=40.0.0-alpha' -H 'Content-Type: application/json' -H 'Authorization: Bearer <vcd_token>'urn:vcloud:catalogContentSource:########-####-####-####-############curl -k -X GET https://<vcd_address>/cloudapi/1.0.0/catalogContentSources/urn:vcloud:catalogContentSource:########-####-####-####-############/accessControls -H 'Accept: application/json;version=40.0.0-alpha' -H 'Content-Type: application/json' -H 'Authorization: Bearer <vcd_token>'{ "values": [ { "tenant": { "id": "urn:vcloud:org:1234####-####-####-####-############" }, "grantType": "MembershipAccessControlGrant", "objectId": "urn:vcloud:catalogContentSource:########-####-####-####-############", "accessLevelId": "urn:vcloud:accessLevel:ReadOnly", "memberId": "urn:vcloud:org:1234####-####-####-####-############" }, { "tenant": { "id": "urn:vcloud:org:5678####-####-####-####-############" }, "grantType": "MembershipAccessControlGrant", "objectId": "urn:vcloud:catalogContentSource:########-####-####-####-############", "accessLevelId": "urn:vcloud:accessLevel:ReadOnly", "memberId": "urn:vcloud:org:5678####-####-####-####-############" } ]}contentsourceaccess.json.curl -kv -X PUT https://<vcd_address>/cloudapi/1.0.0/catalogContentSources/urn:vcloud:catalogContentSource:########-####-####-####-############/accessControls -H 'Accept: application/json;version=40.0.0-alpha' -H 'Content-Type: application/json' -H 'Authorization: Bearer <vcd_token>' -d @contentsourceaccess.json200 OK