Skip to main content
13-Aquamarine
April 21, 2022
Solved

Redirection / Parameters in the URL

  • April 21, 2022
  • 1 reply
  • 2098 views

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!

Best answer by gch

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. 

1 reply

22-Sapphire I
April 22, 2022

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.

gch13-AquamarineAuthor
13-Aquamarine
April 22, 2022

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.

22-Sapphire I
April 22, 2022

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)?