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

Unable to execute services of any entity using Rest Api Call

SOLVED
Highlighted
Aquamarine

Unable to execute services of any entity using Rest Api Call

Hi Team,

 

I am not getting any option of "Services" to execute the services using REST Call.

 

I am trying to execute service using both GET/POST request for below Url:-

http://localhost:8080/Thingworx/Things/ThingName/Services/<ServiceName>

 

But I am not getting any option of "Services" , that'swhy it is showing response as "Invalid Request".

 

Screenshot has been enclosed.

Please let me know how to enable Services execute option using in ThingWorx For Rest Call.

 

Thanks in advance.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: Unable to execute services of any entity using Rest Api Call

Hello @ranjank,

 

If you invoke services of one ThingWorx in another ThingWorx instance , you can use "PostJSON()" of ContentLoaderFunctions resource and for getting property values you use "GetJSON()"

 

Hope it helps,

View solution in original post

4 REPLIES 4
Highlighted

Re: Unable to execute services of any entity using Rest Api Call

Hello @ranjank 

 

Please refer the following article 

 

https://www.ptc.com/en/support/article/CS224211

 

Let me know if it doesn't resolve your issue.

 

Thanks

Om Dukiya

 

Highlighted

Re: Unable to execute services of any entity using Rest Api Call

Hello @ranjank,

 

To enable execution of services using Rest Api, in the case of

http://localhost:8080/Thingworx/Things/ThingName/Services/<ServiceName>

a POST needs to be used in Postman.

 

To retrieve a property value you would need to use http://localhost:8080/Thingworx/Things/ThingName/Properties/PropertyName/

a GET needs to be used in Postman.

Highlighted

Re: Unable to execute services of any entity using Rest Api Call

Hi @Ciprian-Traian ,

 

So that means for getting Property value, I have to use "GetJSON()"

and for service execute, I have to use "PostJSON()" of ContentLoaderFunctions resource.

 

Please correct me If I am wrong.

Highlighted

Re: Unable to execute services of any entity using Rest Api Call

Hello @ranjank,

 

If you invoke services of one ThingWorx in another ThingWorx instance , you can use "PostJSON()" of ContentLoaderFunctions resource and for getting property values you use "GetJSON()"

 

Hope it helps,

View solution in original post

Announcements

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