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

Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X

is it possible to iterate on all Application keys in thingworx without knowing id

MA8731174
14-Alexandrite

is it possible to iterate on all Application keys in thingworx without knowing id

Hi community,

 I would like to ask that if anyone knows that how to iterate over the application keys which are existed in the platform without knowing anything like list of Application keys. Please let me know about it

for eg like GetKeyID(), GetExpirationDate(), ...

 

Thanks!

2 REPLIES 2

Here you go:

 

Resources["SearchFunctions"].SearchModelEntities({ 
    types: {"items": ["ApplicationKey"]} 
}).rows.toArray().map(row => row.name).forEach(key => {
    let entity = ApplicationKeys[key];
    logger.debug('AppKey ' + key + ': ' + entity.GetKeyID() + ', expiring on ' + entity.GetExpirationDate());
});

 

/ Constantine

MA8731174
14-Alexandrite
(To:Constantine)

thank you! i also found out one solution

 

var params = {
tag: undefined ,
nameMask: undefined ,
type: "ApplicationKey" ,
maxItems: 500 
};


var result = Resources["EntityServices"].GetEntityList(params);  
//select output as an infotable

Announcements


Top Tags