cancel
Showing results for 
Search instead for 
Did you mean: 
Create Post
Level 7

Add entries to Orion.DeviceStudio.PollerAssignments

I'm using the REST API to create nodes and assign pollers - it works great.

But I'd also like to be able to assign a Device Studio poller to a node after I've created it (mostly so that the node is assigned the correct MachineType - the MIBs I am working with are not publicly available).

Unfortunately SQLStudio shows that the Orion.DeviceStudio.PollerAssignments object is not write-able: 

SWQL_DeviceStudio.PNG

There also seems to be no verb which will enable this.

Is there any method I can use to assign a node to a device studio poller via the REST API, or if not do you know of any plans to add support for this in a future release?

0 Kudos
2 Replies
Level 8

Hey Were you able to perform this? I am on the same spot that you at this moment

0 Kudos

Unfortunately you have to "fiddle" in the database on that. It is not recommended that you do that but it seems possible.

You need to add a new poller assignment to the table that looks somewhat like that.

insert into [dbo].[DeviceStudio_PollerAssignments] (PollerID, NetObjectType, NetObjectID, enabled)
values ('39611555418-e7ff-426f-b06a-5015f3e2465b','N','12345', 'true')

 

The Poller ID can be obtained from [dbo].[DeviceStudio_Pollers]

 

it's nowhere near "a nice solution" but it works

 

0 Kudos