Have you ever wanted to create your own REST API that triggers numerous Internet of Things (IoT) automations or system updates and then returns a response with data?

Citrix Octoblu has always supported fire-and-forget webhooks via our Trigger nodes to run IoT automations. Now you can use Triggers in your Octoblu flows as entry points to your very own REST API requests. Simply copy and paste the Trigger’s HTTP POST URI into your favorite text editor and change the trigger subdomain to “rest”. This service will now keep the HTTP request open until your HTTP POST sends the response back to the user’s pending request.

Screen Shot 2016-04-15 at 3.52.31 PM

Add a Compose node towards the end of your flow to ready your response data.  In addition to setting new keys with your data to return, you will also need to set a key called callbackURL with the following value: {{msg.callbackUrl}}

Screen Shot 2016-05-02 at 10.59.48 AM

Now add an HTTP POST node to send the message back to the request and include your desired data in the response body.

Screen Shot 2016-05-02 at 11.02.48 AM

That’s it 🙂  Click the Play button in the top right-hand side of the Octoblu designer to deploy your automation. Now you can curl your new API like this:

curl -X POST https://rest.octoblu.com/flows/5ef6cbd0-7119-4a9e-aa16-7dbf849aecda/triggers/18e91540-0359-11e6-9ebc-3f26b59ca2ce

The CURL from my flow should return the temperature in sunny Tempe, Arizona like this:


We can’t wait to see what you build using Citrix’s Octoblu IoT platform!

We hope that you can join us in person at Citrix Synergy, May 24-26 in Las Vegas, to experience Octoblu in person in the demo sandbox!

In the meantime, stay tuned for more posts demonstrating how Citrix Octoblu can automate workflows involving XenApp, XenDesktop, XenMobile, StoreFront, ShareFile, RightSignature, Director and NetScaler! And, please feel free to signup for Octoblu services and start automating your business processes today!

Synergy Banner