Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X
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?
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?
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
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.
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.
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.