I am facing a problem. can't invoke a service using REST API. I wanna execute a service while REST API is called. i try to do this by this link http://MyServer//Thingworx/Things/UtilityThing/Services/CreateThings . But this is not working. Is there any other way to do this.
Solved! Go to Solution.
If you are doing this externally it has to be a POST
There is a lot of good content available on the REST API in this forum and on support.ptc.com, I recommend you do a search.
Also there is a dedicated section in the Java Doc.
Don't forget to check the box in the PlatformSubsystem under the Configuration section for "Allow Request Method Switch". If you don't do this all of your POSTs will be GETs instead and prevent you from exercising any services.
My understanding was that "Allow Request Method Switch" allows you to replace POST with GET + "&method=post" parameter, which is outdated and discouraged practice left mainly for compatibility with legacy clients which couldn't send HTTP POST.
Please correct me if I'm wrong.