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

How write http request for sending data

SOLVED
aanikeev
Newbie

How write http request for sending data

Hi, everybody! I'm need in your help! How can write http request for url line for change options in servises thing?
How i do thing:

1) i'm created new thing with key and adding to them general term.

2) after created properties and service

3) and on end created "permissions setting".

My url line was so:

http://52.204.242.125/Thingworx/Things/SMThing/Services/setData?appKey=46f4779f-4fd5-4dfc-900b-0b000...

Us composer 7. What am I doing wrong?

Tags (1)
1 ACCEPTED SOLUTION

Accepted Solutions

Re: How write http request for sending data

Guys, thank you for your help me!!!)  all have earned !))) i am very happy but I'm don't understand why, but correct request was so: http://52.222.99.50/Thingworx/Things/name thing/Services/name service/?appKey= itself app key&x-thingworx-sx-thingworx-session=true&method=post&value=1   It's strange how and the last time I did the same thing , maybe the reason is really in setting the subsystem?

View solution in original post

5 REPLIES 5

Re: How write http request for sending data

Aleksey, are you trying to change a properties value or are you trying to send input parameters for a service? Here's a knowledge base article on how to allow REST calls through the browser.

Re: How write http request for sending data

Aanjan, I try to send input values for a service. Thank you for this information, i did what was written in this article, but i have all the same errors, which i write Andrew.

Re: How write http request for sending data

Hello, Aleksey

Try to fix your link with ​x-thingworx-session=true


something like

http://52.5.22.242/Thingworx/Things/<Your Thing>/Services/<Your Services>?appKey=<your appKey>&method=post&x-thingworx-session=true&Number=1

Hope it will help.

Re: How write http request for sending data

Andrew, thank you for your help! Yes, so really it works. But now i again faced with problem. Request passes, but data in properties not change. I look my log and see several errors: Error sending response: java.lang.NullPointerException; Invalid request: com.thingworx.common.exceptions.InvalidRequestException: Illegal Content... Whats this can be?

Re: How write http request for sending data

Guys, thank you for your help me!!!)  all have earned !))) i am very happy but I'm don't understand why, but correct request was so: http://52.222.99.50/Thingworx/Things/name thing/Services/name service/?appKey= itself app key&x-thingworx-sx-thingworx-session=true&method=post&value=1   It's strange how and the last time I did the same thing , maybe the reason is really in setting the subsystem?

View solution in original post

Announcements

Check out the upcoming Expert Session: Understanding ThingWorx Navigate Licensing in Community "Customer Events" section.