Dynamic fields in HTTP Route URL field

Hello everyone,

I’m trying to forward my Notecard data from Notehub to Ubidots using an raw HTTP Route. Based on Ubidots’ Docs, they recognize the device label one wants to send data to in the URL as follows:

https://industrial.api.ubidots.com/api/v1.6/devices/{DEVICE_LABEL}

where the {DEVICE_LABEL} is to be replaced by a unique label within Ubidots account. I’d like that to be my Notecard’s Device UID.

How can I set up my Route URL field so it replaces that portion of the URL with the Device UID syncing data to Notehub and triggering the Route?

I need this since I’d like to have a single Route to serve all of my Notecard devices or Product

Thanks in advance.

D

2 Likes

Hey David, welcome to the community, we’re glad you’re here!

I know I sent you this info via email yesterday, but I will include it here for anyone else who might be interested.

There are 3 fields you can use in the route url that can help here. Note all three must include the square brackets:

  • [device] - for the DeviceUID
  • [product] - for the ProductUID
  • [sn] - for the Serial Number

So, for Ubidots, https://industrial.api.ubidots.com/api/v1.6/devices/[device] will route to a url with your DeviceUID on the end.

1 Like