Toolblox API
Toolblox API is split into two: Toolblox Development API and Toolblox Contract API (or dAPI).
Toolblox Development API
With Tooblox Development API users can automate smart-contract generation. In summary this is the general workflow:
- Use API to create new smart-contract workflows or to update existing workflows (SLA 99.9%)
- The API will
- Use AI to create a workflow
- Construct the workflow, store it and provide a URL in return
- If id is given, update an existing workflow
- The URL can be used to open the workflow and deploy it onto a selected blockchain
- The URL can be shared with customers to initiate a transfer of ownership. The idea is that while a solution provider can help businesses build blockchain solutions it is up to to the customers to deploy the smart-contracts in the end to ensure proper custody.
Prerequisites
- Credits to use the AI generator (credits are included in each plan)
Toolblox Development API Endpoint
Parameters
Name | Mandatory | Description |
---|---|---|
apiKey | Yes | Generated in Toolblox profile page |
text | Yes | Contains freetext description of the desired workflow. It should describe the object type stored in the smart contract, its properties, and user roles who can perform actions throughout its lifecycle. Recommended at least 3 sentences for a good outcome but more is better. Any language can be used although English gets the best results. Workflow will be created in English. POST requests can omit the text parameter and replace it with request content instead. For GET requests text parameter is mandatory. |
id | No | Contains the workflow id - if given will perform an update of existing smart contract workflow instead of creating a new workflow. |
Example to create workflow
Creation of an apartment rental service using blockchain, built with API builder.
Parameters
Parameter | Value |
---|---|
apiKey | active API key |
text | create a workflow for managing appartment rent. add also way to pay rent each month |
URL
Response
{
"currentUsage": 1,
"url": "https://app.toolblox.net/transfer/appartment_rent_workflow_xxxxxx",
"id": "xxxxxxx-xxxxx-xxxxx-xxxx-xxxxxx"
}
This is the smart contract workflow that got generated and opens using the received link.
Example to update workflow
Parameters
Parameter | Value |
---|---|
apiKey | active API key |
text | Add a way to make apartments unavailable for rent |
id | id returned from first request |
URL
Response
When refreshing the UI for the smart contract we see that an 'Unavailable' state has been added: