About Component Exchanges Hosted in Visual Builder Studio Projects
A Visual Builder Studio project can host a secure component exchange to store and distribute components only available to developers in the instance.
Each Visual Builder Studio project includes the component exchange 'compcatalog', which is the service used to access components stored in the project. The compcatalog service is provisioned by default with each project. Any project can be used to host an exchange if storage is enabled for the Visual Builder Studio instance. Component developers can use the service's APIs to publish components to the exchange.
To integrate a private exchange in a Visual Builder Studio project with a Visual Builder instance, an administrator specifies the URL for the project's compcatalog service and the credentials for a user that can access the project. The credentials used to connect to the exchange must be an owner or member of the Visual Builder Studio project hosting the exchange. All developers in the tenant use these credentials to connect to the exchange to get the components and application templates they want to use in their projects.
The URL for the project's compcatalog service has the following form: https://<hostname>/<org_id>/s/<project_id>/compcatalog/0.2.0/
In the URL, "compcatalog" is the exchange service and "0.2.0" is the API version of the service.
To determine the URL for the compcatalog service, you need to know the following details about the Visual Builder Studio project:
- <hostname>. This is the Visual Builder Studio server where the project is hosted.
- <org_id>. This is the organization (tenant) name.
- <project_id>. This is a project identifier unique to the tenant. This is not the same as the project display name entered by the project owner and is not displayed in the Visual Builder Studio UI.
If you do not know the <project_id> for the project hosting the exchange, you can get it from the Git or Maven configuration, or by using the Visual Builder Studio Projects API. The following table describes how to get the <project_id>.
| Method | Steps |
|---|---|
| From a Git or Maven configuration |
The Git repository URL will be similar to the following: The Maven repository URL will be similar to the following: In these examples, "my-org_testproject_5" is the project identifier. In this case, the URL for the 'compcatalog' service will be similar to |
| Using Visual Builder Studio Projects API |
If you know the name of the project sharing your exchange instance, you can get the project metadata using a REST call to the Visual Builder Studio API. For example, you can use cURL to send a REST call similar to the following: curl -X GET -u '{username}:{password}'https://{hostname}/{org_id}/api/v2/projects/info/name:TestProjectThe return should be similar to the following: In this example, the identifier property in the return is the project identifier that is needed for the "compcatalog" service URL. |