cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X

REST API call to thingworx shows success but no data is present in response

bmdeshmukh18
10-Marble

REST API call to thingworx shows success but no data is present in response

Hi,

 

I am making a REST API call to get Thing property data from Thingworx server using postman.
I am able to see the reponse code is 200. But I am not able to see any data in the response.

As seen below, I am trying to get the value of name property from SystemRepository. I am getting successful response, but no data is returned.

 

bmdeshmukh18_0-1655262776977.png

 

 

In this scenario Thingworx server is a secured server hosted behind a proxy server nginx.

 

Can anyone point me to the issue what may be happening.

 

Thanks and Regards,

Bhushan

ACCEPTED SOLUTION

Accepted Solutions

I believe this is related to the way nginx is configured, but I can not point to the specific configuration of nginx that is required in this situation, since it's not a PTC product.

However, I can confirm that this call returns the proper value when executed against a local ThingWorx installation in my laptop.

The response should be:

{"dataShape":{"fieldDefinitions":{"name":{"name":"name","description":"Thing name","baseType":"STRING","ordinal":0,"aspects":{"isReadOnly":true,"isPersistent":false,"isBuiltIn":true}}}},"rows":[{"name":"SystemRepository"}]}

View solution in original post

2 REPLIES 2

As mentioned in Original Post, the Thingworx server is hosted behind the Proxy Server(NGINX).

Could this be the issue? As I try to execute any call, In the response I am seeing the Server as nginx.

If nginx is the error then what would be the additional authorization parameters we will need to use for the server access.

bmdeshmukh18_0-1655273614716.png

 

Any Help will be appreciated.

 

Thanks and Regards,

Bhushan

I believe this is related to the way nginx is configured, but I can not point to the specific configuration of nginx that is required in this situation, since it's not a PTC product.

However, I can confirm that this call returns the proper value when executed against a local ThingWorx installation in my laptop.

The response should be:

{"dataShape":{"fieldDefinitions":{"name":{"name":"name","description":"Thing name","baseType":"STRING","ordinal":0,"aspects":{"isReadOnly":true,"isPersistent":false,"isBuiltIn":true}}}},"rows":[{"name":"SystemRepository"}]}
Announcements


Top Tags