# Scope Route execution confusion

**URL:** <https://discuss.blues.com/t/scope-route-execution-confusion/850>\
**Category:** Notehub.io\
**Created:** [May 30, 2022, 3:34am UTC](https://discuss.blues.com/t/scope-route-execution-confusion/850 "2022-05-30T03:34:47Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![LBBD](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.blues.com/lbbd/32/209_2.png) [@LBBD](https://discuss.blues.com/u/LBBD)\
**Post date:** [May 30, 2022, 3:34am UTC](https://discuss.blues.com/t/scope-route-execution-confusion/850/1 "2022-05-30T03:34:47Z")

</div>

The confusion is about limiting the route execution to a single Notecard.

I was about to set up a few General HTTP/HTTPS Request/Response routes to Ubidots and just when I thought everything was clear, I got confused about the scope of the route execution.

My understanding of the documentation is that the scope of the route execution can be a single device, a fleet, or an entire project.

> A Route is an external API, or Server location, where Notes will be forwarded for a [Device](https://dev.blues.io/reference/glossary#device) or [Fleet](https://dev.blues.io/reference/glossary#fleet) upon receipt.  
> Routes are defined in Notehub for a [Project](https://dev.blues.io/reference/glossary#project), and can target a single Fleet or all devices in a Project.

In the General HTTP/HTTPS Request/Response configuration there is a filter for selecting a fleet or using the route for the entire project:

 ![routeScope](https://us1.discourse-cdn.com/flex020/uploads/blues/original/1X/b7bedabd4b8f338f19538808e730680a07842d88.jpeg)

I couldn’t figure out, however, how to limit the scope of a route to a single device.

Following the [Route Tutorial](https://dev.blues.io/guides-and-tutorials/routing-data-to-cloud/ubidots/#route-tutorial) Ubidots specific part I was under the impression that substituting the `[device label]` in the Ubidots endpoint URL `https://industrial.api.ubidots.com/api/v1.6/devices/[device lable]/`  
with the Notecard’s Product SN or DeviceUID, the scope of the execution will be automatically limited to that particular device. Nevertheless, that’s not the case.

Setting up multiple routes with multiple `[device label_1] ; [device label_2] ...etc`, successfully initialize the corresponding device\_1, device\_2, etc. in the Ubidots platform, but all devices display all the variables in the Fleet or Project.  
If multiple Notecards send temperature and humidity information for example, than all devices in Ubidots will display the same temperature and humidity values that were extracted from the last event in the fleet or project. When event\_1 captures device\_1, than all devices in Ubidots will display temp\_1 and humidity\_1. When event\_2 captures device\_2, than all devices in Ubidots will display temp\_2 and humidity\_2 … and so forth.

So, **the brief question is, how can I limit the route execution to one particular Notecard ?**

Thanks

---

<div class="post-metadata">

**Author:** ![RobLauer](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.blues.com/roblauer/32/1567_2.png) [@RobLauer](https://discuss.blues.com/u/RobLauer)\
**Post date:** [May 30, 2022, 6:47am UTC](https://discuss.blues.com/t/scope-route-execution-confusion/850/2 "2022-05-30T06:47:15Z")

</div>

Hi @LBBD,

In order to accomplish this I would recommend adding that single device to a new fleet, then choosing the fleet in the route creation UI. I’ll add a feature request to allow for choosing individual devices and fix the docs too!

Thanks,  
Rob

---

<div class="post-metadata">

**Author:** ![LBBD](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.blues.com/lbbd/32/209_2.png) [@LBBD](https://discuss.blues.com/u/LBBD)\
**Post date:** [May 30, 2022, 1:19pm UTC](https://discuss.blues.com/t/scope-route-execution-confusion/850/3 "2022-05-30T13:19:42Z")

</div>

@RobLauer Thanks for your quick reply and the workaround.

Speaking of feature requests, would you also consider looking into the issue of routing many devices to Ubidots?

There is an [open discussion](https://discuss.blues.com/t/dynamic-fields-in-http-route-url-field/219) about it where we were hoping @dsepulvedara to chime in but it might need a direct communication between your companies.

Until then, individual routes would provide a temporary solution.

Thank you.

---

<div class="post-metadata">

**Author:** ![dsepulvedara](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.blues.com/dsepulvedara/32/151_2.png) [@dsepulvedara](https://discuss.blues.com/u/dsepulvedara)\
**Post date:** [May 30, 2022, 5:47pm UTC](https://discuss.blues.com/t/scope-route-execution-confusion/850/4 "2022-05-30T17:47:20Z")

</div>

Hello @LBBD

You’re right about the tutorial, it sort of suggest that when manually replacing the `{DEVICE_LABEL}` for a fixed Notecard’s ID, then the Route will only work for said card. As you’ve pointed out, this is not the case.

In the tutorial, it is shown like that as an example only, however, you should actually use the URL field like follows:

```auto
https://industrial.api.ubidots.com/api/v1.6/devices/[device]

```

This will dynamically replace `[device]` by your Notecard’s ID, and will allow you to correctly forward data from your devices in a fleet into Ubidots.

Does it make sense?

Last not least, I agree with @RobLauer. For the time being, simply create a independent project if you want a device with a route of its own.

Best,

–David
