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

Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X

How I access thingname and its properties through a set "identifier"

SS_10815109
2-Guest

How I access thingname and its properties through a set "identifier"

I have set an "identifier" for an existing thing. Can I access the thing name and its properties using the identifier instead of the thing name. If YES, how do we do this? 

7 REPLIES 7

Hi @SS_10815109  you want to access things in the composer or API call or at any services, can you explain your use case in detail?

Hi @Surya_Tiwari , i am asking about the API call. 

For example: /Thingworx/ThingName/Properties can give us the list of properties in JSON.

Can I make a similar API call through the "identifier" without using the thing name?

odukiya
15-Moonstone
(To:SS_10815109)

Hello @SS_10815109 

 

For making any API call we have a predefined URL for thingworx that has to be followed for eg 

<http/https:><host:port>/Thingworx/<entity collection>/<entity>/<characteristic collection>/<characteristic>?<query parameters>

You can also refer following guides for more information

Thingworx Rest API 

ThingWorx REST Design 

 

So Identifier won't be helpful here.  It is a way to associate your virtual thing with remote thing 

Ref guide : Identifiers 

Hope it answers your query please feel free to revert in case you have any further concerns

Thanks

Om dukiya

Thank you for your response. It means there is not a direct API call for identifiers to retrieve things associated with it.

Rocko
17-Peridot
(To:SS_10815109)

You could write a wrapper service which takes the identifier as input, resolves it to the thingname via e.g. an internal infotable, gets the things' properties value and returns it. Your REST call will have to provide the identifier as payload in the body to the service.

Do you mean writing a service that will take identifier as input and gives its thing name and properties as output? I am new to thingworx services. I have just used Thingworx built-in services as of now. I will have to look into this.

Rocko
17-Peridot
(To:SS_10815109)

Exactly. What you call identifier is in Thingworx normally the thingname. If you can't make the identifier your thingname, eg. for technical reasons, you will need  a service that resolves the identifier to the thing name, and then gets the things' properties. This service is available with REST automatically.

Top Tags