Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X
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.
Hello Meghan,
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.
/ Constantine
Clarification: This is only if you are directly invoking the request within a browser and not from an external source.
Hello Ibrahim,
That's how you do it:
Regards,
Constantine
Thank you every one. The problem is solved.
I just added appKey with the link.