Forum Discussion
Well, looks like you can no longer add a Device-specific SDT using V3, am I understanding that correctly? There's no 'Device' type anymore, and no fields to specify deviceDisplayName or deviceID.
- Anonymous7 months ago
Set the type to "ResourceSDT"
In LM "resource" == "device"
- Mike_Moniz7 months agoProfessor
One trick that can help is that the portal itself uses the API. So you can set in SDT in the portal and watch the Networking tab of the Browser's developer tools to see the request and parameters. Like here is what I got when doing a 1 hr SDT on a device:
{"deviceId":100,"type":"ResourceSDT","sdtType":"oneTime","startDateTime":1715093520000,"endDateTime":1715097120000,"timezone":"America/New_York","comment":"test"}
P.S. The portal does sometimes use undocumented or functions that are not in the API. But most day-to-day stuff uses the same API.
- Skeer7 months agoNeophyte
Ha! Yeah I'd think it'd be important to include 'deviceId' in the swagger docs. My main skill set is not developer related so I rarely think about dev tools like that. Good call.
- Mike_Moniz7 months agoProfessor
Yeah, that is very odd that it's missing from Swagger. I also thought that Swagger was auto generated from code so I'm not sure how it can miss it. I've never used it outside of vendor API references so perhaps I'm wrong on that.
Related Content
- 3 months ago