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

Calling a ThingsWorx service from Unity

SOLVED
Highlighted
Regular Member

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!

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Calling a ThingsWorx service from Unity

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

Re: Calling a ThingsWorx service from Unity

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

Re: Calling a ThingsWorx service from Unity

@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

Re: Calling a ThingsWorx service from Unity

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

Thingworx Navigate content has a new home! Click here to access the new Thingworx Navigate forum! ______________________________