Get the Results
When you define an endpoint as a webhook to an action that runs a model, your endpoint is triggered with every update regarding the model's prediction process. Using this, you can update the data rela
Last updated
When you define an endpoint as a webhook to an action that runs a model, your endpoint is triggered with every update regarding the model's prediction process. Using this, you can update the data rela
Last updated
Aicado AI provides both actions and data calls simultaneously for you to get results. You can choose either of them according to your app case in the most suitable way.
To use Backend WF API, first of all you need to go to “Settings > API” tab and enable the Workflow API and backend workflows.
Add a new API workflow
Set the API workflow properties
If you check the 'This workflow can be run without authentication' checkbox, it means that anyone can trigger this endpoint without any authentication. This can be a risky choice. The security you provide when exposing your endpoints publicly is not Aicado AI's responsibility. Please get information about API Workflow Security from the Bubble Manual if you are not familiar with it.
To process the response data, you need to initialize your endpoint at the first run operation. To do that, click on the “Detect Data” on your backend WF.
After clicking on "Detect Data" you can proceed to the next step.
Copy your endpoint url.
Open a new tab on your browser (Otherwise the “Detect Data” window will be closed) and go to the “Workflow” tab of your app editor. Enter your “endpoint url” into the response_web
field property in the action that you’d like to run a model.
Preview your app and run the workflow event. Once you do that, your Backend API WF automatically detect to request data. Click on the “Save” button.
After the initiliazition, you should delete the initialize from the query.
The webhook we set up will run every time the status of the prediction model is updated. When we get the parameters with "Detect Data" in the previous steps, we get the prediction status when it is "starting". However, when the status returns to "succeeded", we can get different data from the model and use it. The easiest way to do this is to manually manipulate the JSON with "Modify types" after completing the "Detect Data" steps.
Let's do it!
Click on the “Modify types” button
Then, show the raw data and click to the “Edit raw data” text
In this field, we will paste the response JSON that the "AI Art QR Code" endpoint in our documentation should return at status code "200".
Only copy highlighted text (between response brackets) on the below image
No matter which model you are building, the pattern you will follow will be the same. JSON responses of all endpoints can be found here.
Find the prediction process in your database filtering by run_id
.
Modify data by using the “AI Art QR Code” data call