Hi all,
I've a couple of questions regarding Thx REST API. We're using it for displaying an inventory view in an external webserver.
- Is it possible to select the attributes returned when getting the things implementing a custom pattern? (i.e.: GET Thingworx/ThingTemplates/MyTemplate/ImplementingThings/)
- Is there any option to receive the result paginated or to set any pagination options?
Thanks!
Solved! Go to Solution.
I would recommend a wrapper service to provide what you need.
Instead of calling Thingworx/ThingTemplates/MyTemplate/ImplementedThings, you would call Thingworx/Things/MyServiceWrapper/Services/GetMyTemplateImplementedThings
There, your service script would accept arguments for the attributes and patterns you want. You can also implement pagination in your service, as Thingworx doesn't seem to provide pagination itself.
I would recommend a wrapper service to provide what you need.
Instead of calling Thingworx/ThingTemplates/MyTemplate/ImplementedThings, you would call Thingworx/Things/MyServiceWrapper/Services/GetMyTemplateImplementedThings
There, your service script would accept arguments for the attributes and patterns you want. You can also implement pagination in your service, as Thingworx doesn't seem to provide pagination itself.
Thanks Hatcher, we'll proceed that way