Skip to main content
13-Aquamarine
Apr 21, 2022 11:37 AM UTC
Solved

Redirection / Parameters in the URL

Hi,


A third part product send a rest rest call to Thingworx with the following formatting: "equipment/instance/{id}/state"
I need a solution (inside or outside tomcat) to transform the Rest call to something that Thingworx will accept, e.g. /Things/MyThingName/Services/getState?id={id}"

Is there an easy way to do this?

Thanks!

gchAnswer
13-Aquamarine
Apr 27, 2022 12:07 PM UTC

Alright thanks!

I added a reverse proxy (Nginx) in my infrastucture to handle this. I configured a 'rewrite' and I tested it using curl. It seems to be working well also using the basic Auth / -u in curl. 

6 replies

22-Sapphire I
Apr 22, 2022 11:23 AM UTC

The service that you provide to ingest this rest call should be able to take the content and parse that.

Not exactly sure if you are saying that the third party can only send information as a specific 'URL' only without content.

Translate
gch13-AquamarineAuthor
13-Aquamarine
Apr 22, 2022 12:50 PM UTC

The 3Part service can only send Rest Call of type "equipment/instance/{id}/state". 

But Thingworx doesn't have any Thing named {id}, the id should be pass as a parameter, this is my issue.

Translate
22-Sapphire I
Apr 22, 2022 12:53 PM UTC

That unfortunately is a very limited ability. Are you sure that is the only capability this device has? What device is this?

Also this is a GET? How would you include authentication (appkey)?

Translate