5 Replies Latest reply on Jan 18, 2018 3:50 PM by afarley RSS
    afarley Newbie

    REST API not accepting credentials

    I'm trying to read and update property values using the REST API guide. I'm using Postman to test the following query:


    GET [xxxxxx]/Thingworx/Things/HouseThing/Properties

    I've specified my ThingWorx login credentials under HTTP Basic Auth parameters in Postman but the API is returning 401 Unauthorized. Am I supposed to have a different set of credentials for this authentication?



    I did have to create a new user (see the Users link on the left-side of the Composer window). Too bad this isn't mentioned under the REST API tutorial, or the Foundation tutorial, or the Quickstart tutorial. I couldn't see any indication from the API or the instructional documentation about the different types of ThingWorx credentials.

    Now I'm having a different issue: when I run this query,

    I expect to see a list of the same properties that I see when I visit the "Properties" link under the HouseThing Composer view. In fact, I don't see *any* of the HouseThing parameters. The API response is as follows (why doesn't it show the address/temperature/light properties?):



            <TITLE>Property Listing For HouseThing</TITLE>

            <LINK rel='Stylesheet' href='/Thingworx/css/thingworxapi.css' type='text/css'></LINK>

            <META http-equiv='Content-Type' content='text/html'></META>

            <META http-equiv='cache-control' content='no-cache, no-store'></META>

            <META http-equiv='expires' content='-1'></META>

            <META http-equiv='pragma' content='no-cache, no-store'></META>

            <META http-equiv='refresh' content='30'></META>



            <IMG SRC="/Thingworx/images/ThingworxLogo.png"/>


            <H1>Property Listing For HouseThing</H1>