2 Replies Latest reply on Aug 29, 2016 5:17 PM by pchung RSS
    mz Newbie

    Problem in PUT in REST api

    Hi Everyone,

    I want to get / put something to a Uri with a specific AppKey.

    To perform GET COMMAND, console response to this command "curl -XGET -H "Content-Type: applUation/json" -H "Accept: application/json" -H "appKey:************************************" "http://52.3.175.227/Thingworx/Things/SteamSensor2/Properties/salam" "
    is
    " {"dataShape":{"fieldDefinitions":{"salam":{"name":"salam","description":"","baseType":"NUMBER","ordinal":1,"aspects":{"isReadOnly":false,"dataChangeThreshold":0.0,"isPersistent":true,"isLogged":true,"dataChangeType":"VALUE","cacheTime":0.0}}}},"rows":[{"salam":12.0}]} "

     

    and every thing is just fine. But when I want to put, response to this command " curl -XPUT -H "Content-Type: applUation/json" -H "Accept: application/json" -H "appKey:***************************************" "http://52.3.175.227/Thingworx/Things/SteamSensor2/Properties/*" -d{"salam":24} "

    is

    " Access to the specified resource has been forbidden. ".

     

     

    Property name that I want to change is 'salam'. What is my problem and what should I do to fix it ?

    Thanks to every comment that helps

     

    REGARDS