After reading this article you’ll know how to:
Create a new data source
Share it via the block store
Our platform expands its capabilities by presenting new features in the Next-gen applications, one of which is the possibility of adding your own custom blocks to the application and sharing them via the block store. This article in particular explains how to create your remote data source using a public Swagger Petstore API and then share it with other customers and organizations.
Creating a new data source
First of all, let’s go through the process of creating your own remote data source.
Open your application and go to the data model. On the right, you’ll see the block with data sources. Click on the ‘New data source’ button (1) and on the new page again press the ‘Create data source’ (2).
Data sources are connected to external APIs, making it possible to use data from that API directly inside this application. Come up with a name for this data source and enter the metadata URL from the API description. After this, press ‘Connect’ and make sure to receive the ‘Connected’ message and the host URL. The host may differ per environment, so you can use the configuration on the right of it to set another host URL per sandbox environment. Lastly, hit ‘Create data source’.
Sharing a data source
As you are redirected back to the data model, you’ll notice that our newly created data source Swagger API Petstore is added to the data sources overview.
Click on it to open the settings. On the right, see the ‘Share in the Block’ section and press the ‘Save as data source block’ button to share this data source in the block store.
The next step is to add an image and data source description, these two are optional. After you’re done, click ‘Save Data source block’.
And finally, you can make the block available for either owners or the owners and current organizations and release it to the block store.
We can get back to the block store now and see that our Swagger API Petstore is already there. Now it’s ready to be installed by everyone that belongs to your organization. Come back to it any time to edit visibility and either unrelease it or delete it completely. When you unrelease this block, it will no longer be visible to others in the block store.
Sharing data sources via the block store is a convenient and quick way to enable everyone in an organization to use the same tools. It increases the overall availability and reusability of data across various applications. Hope you find this useful!