Skip to main content
1-Visitor
Jun 21, 2022 10:09 AM UTC
Question

How to pass payload in Postman POST request for executing QueryImplementingThings service in TWX 8.5

We have to apply query on LastConnection Datetime Property via postman.

 

Please share the snippet.

 

Thanks in advance.

4 replies

22-Sapphire I
Jun 21, 2022 2:49 PM UTC

lastConnection is a property on the 'remote' thing, you could get this with either a 'Get' at <Server>:port/Thingworx/Things/<Name of Thing>/Properties/lastConnection

Or a 'Post' and query something like GetPropertyValues

First method would be simpler if all you needed was the value of the one property.

First method would require Visibility of the Thing and Runtime Property Read

Second method would require Visibility of the Thing and Runtime Service Execute of the service you will use and Runtime Property Read

Translate
RK_07051-VisitorAuthor
1-Visitor
Jun 22, 2022 6:50 AM UTC

@PaiChung 

The service we need to call is of ThingTemplate and not from Things, thatswhy we are running this service QueryImplementingThings to fetch all the things implementing that template via POST request.

 

Could you please help on that json paylod for POST request.

Translate
22-Sapphire I
Jun 23, 2022 12:28 PM UTC

Although it may be a large payload of information coming back, you could just run Query/GetImplementingThingsWithData and then pull the lastConnection from each entity.

 

Translate