Warning!
This is a legacy document. The features described below are only usable within the classic-generation environment.
Currently, Betty Blocks offers faster and more advanced options that are available in next-gen. Before you start working on some new features in your application, consider doing it using the next-gen version. In particular, you might find it useful to check out Using the HTTPS action step and Setting your remote data source articles.
Good luck!
There are many pre-built blocks in the Block store that you can utilize. However, it's possible that a webservice that you commonly use in your applications isn't included. Don't worry; in this situation, you can build the Block yourself and utilize it in all of your apps.
In this example, we'll be using a simple webservice without a real purpose, but it will show exactly what you need to know.
Creating a webservice
Start by creating a webservice. After the webservice is saved, a Block button appears in the bottom left corner of the tab.
Create new Block
When clicking the button, a modal appears with two options; Create a new Block or add to an existing Block. In this article, we will be focussing on creating new Blocks.
Above you can see how we entered a name for our new Block and below you can see the confirmation when the Block is created. It even has a button that directs you to your new Block. Let's go!
Completing new Block
So now we are in our new Block, but you'll notice immediately that our Block is unreleased. This means you won't see it in any other application you own until you release it.
Before we release this Block, let's complete it by adding information such as the 'About this Block' description, and let's add an image to the Block.
The Dev content shows you what components the Block consists of, in this case it's just a single webservice.
The Permissions shows where the Block can be found. By default, this is set to Only owners. Logically, noyl the owners of an application can view the Block and reuse it in other applications.
By setting it to Owners and organizations the Block is also available for developers in Organization you added in that field. This can useful when you work in different teams on various projects.
Releasing a new Block
We finally got to the point where we get to release the Block!
Just click Release and let the magic happen. Depending on how much is included in your Block, this may take from 2 seconds to a minute.
When it's done, you'll see a confirmation in the bottom-left corner with the message that your Block is released successfully.
Alright, that's how you convert your own webservice to a Block and release for yourself or organizations that you want to share it with.