Skip to main content
Callbacks enable the retrieval of a model’s status when it transitions to either ‘complete’ or ‘error’. This is accomplished by sending a POST request to the specified URL, with the payload structured as follows:
Let’s break down each key:
  • name: name of the model
  • version: version of the trained model
  • active: indicates whether the newly trained model is active
  • predictor_id: unique identifier for the trained model
  • predictor_created_at: time at which the model was created
  • old_status: status the model had prior to receiving the new_status
  • new_status: current status of the model
  • changed_at: time when the model’s status transitioned from old_status to new_status
Please note that this feature works only in MinsdDB Cloud and only for MindsDB Starter users.

Callbacks API

Callback API provides information on how to add, get, edit, and delete callbacks.

Add a Callback

This is the Request format:
And this is the Response format:

Get a Callback

This is the Request format:
And this is the Response format:

Edit a Callback

This is the Request format:
And this is the Response format:

Delete a Callback

This is the Request format:
And this is the Response format:

Handling Callbacks using Python SDK

Below is an example of using callbacks with the home_rentals model. Be sure that your endpoint HOSTNAME is accessible from the internet.
Please note that localhost is not accessible from the internet - you can make localhost accessible via multiple ways, like ngrok tunnel.

Handling Callbacks using JavaScript SDK

Below is an example of using callbacks with the home_rentals model. Be sure that the callback HOSTNAME is accessible from MindsDB Cloud.