Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X
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.
Solved! Go to Solution.
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,
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
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.
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.
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,