<aside> đź’ˇ Download flow: (*import instructions)*

http_flow_example.json

</aside>

  1. The flow will look like this when imported.

Untitled

Passing the pass/fail output to a REST Post call

Starting from the default pipeline.

Untitled

The classification block outputs a boolean indicating if the inspection is a “pass” or a “fail”. If you want to send that to a rest API, you must first convert that boolean to a JSON dictionary.

You can do that by using the function block.

Untitled

Inside the function block, you will add the following code msg.payload = {"pass_fail": msg.payload}. You can change pass_fail key to something that would make sense on your REST server.

Untitled

You can now send the output of the function to the HTTP request

Untitled

Inside the http request block you can configure your REST settings

Set Method to POST to send data

Set the URL to the URL you want to send the data to, if you first want to try the functionality locally you can set it to http://localhost:1880/api/post before setting it to your real URL.

Untitled

If you want to visualize your post request add the following blocks

Untitled