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

Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X

How write http request for sending data

aanikeev
1-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-0b000001b137&method=post&value=14

Us composer 7. What am I doing wrong?

1 ACCEPTED SOLUTION

Accepted Solutions

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
Aanjan
9-Granite
(To:aanikeev)

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.

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.

ak-31
1-Newbie
(To:aanikeev)

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.

aanikeev
1-Newbie
(To:ak-31)

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?

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?

Top Tags