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

Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X

Calling a ThingsWorx service from Unity

Diveye
10-Marble

Calling a ThingsWorx service from Unity

Hello!

 

I'd like to know if it is possible to run a ThingsWorx service through an external application (like Unity). Ideally I'd want to keep the scripting of the service on ThingsWorx for various reasons, so it would really just be to do something like "MyThing.GetService("MyServiceName").Run();" (with the data returned by the service being re-routed to the external app obviously) or something along those lines. 

 

Thanks!

ACCEPTED SOLUTION

Accepted Solutions
PEHOWE
16-Pearl
(To:Diveye)

Hello @Diveye ,

 

I have not tried what you are requesting, ThingWorx does provide access through a RESTapi.

I believe the Article - CS249622 address your question. Have you reviewed this article.

You should be able to see what is visible using the browser:

  • <Host Info>/Thingworx/Things/<thing name>/ServiceDefinitions/<service name>

For a method of testing you could use a tool like "Postman" to make the REST api calls.

View solution in original post

3 REPLIES 3
PEHOWE
16-Pearl
(To:Diveye)

Hello @Diveye ,

 

I have not tried what you are requesting, ThingWorx does provide access through a RESTapi.

I believe the Article - CS249622 address your question. Have you reviewed this article.

You should be able to see what is visible using the browser:

  • <Host Info>/Thingworx/Things/<thing name>/ServiceDefinitions/<service name>

For a method of testing you could use a tool like "Postman" to make the REST api calls.

vangne
16-Pearl
(To:PEHOWE)

@Diveye 

I just wanted to follow up to see if previous response was helpful for your question?

 

If so, please indicate the appropriate response as the Accepted Solution for the benefit of other Community members who have the same question. If you are still experiencing issues, please do let us know your questions or concerns.

 

Thanks,

Vibhuti

Diveye
10-Marble
(To:PEHOWE)

Hello,

 

Thank you for your answer. Using a REST api and an app key generated directly on thingworx, I was able to create a get request. For any person interested in how to achieve this, there is a great tutorial available here: https://developer.thingworx.com/en/resources/guides/thingworx-rest-api-quickstart

 

Best regards,

 

Diveye

Announcements


Top Tags