Chapter 11. Testing the deployed application endpoint for your prediction function

After you deploy your application, you can test that your prediction function works properly at the deployed endpoint.


  • Your application is built and deployed with your prediction function included.
  • You know the web address for the application containing your prediction function.


  1. Open a terminal in JupyterLab by clicking FileNewTerminal.
  2. Run the following command, replacing <application-url> with the web address for the application, for example,

    curl -X POST -H "Content-Type: application/json" --data {"data" : "hello world"} <application-url>/prediction

    For example:

    curl -X POST -H "Content-Type: application/json" --data {"data" : "hello world"}

    Alternatively, enter ! followed by the same command in a new notebook cell and run the cell.

    !curl -X POST -H "Content-Type: application/json" --data {"data" : "hello world"} <application-url>/prediction


  • The endpoint is working if you receive a response from the application, such as {"prediction" : "not implemented"}.