Get a list of all users.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Get a list of all users.
Is there a service function to get a list of all users known to the system?
Solved! Go to Solution.
- Labels:
-
Troubleshooting
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Because Users are just Entities of type "User" you can call the GetEntityList service in EntityServices with the 'type' argument set to "User"
I am not sure if a specific function exists for getting just users, but this should do the trick.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Because Users are just Entities of type "User" you can call the GetEntityList service in EntityServices with the 'type' argument set to "User"
I am not sure if a specific function exists for getting just users, but this should do the trick.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Apart from Thearon's suggestion, there is another service called 'GetActiveUsers' under Resources -> CurrentSessionInfo. This would only give you the current logged in/ active users though.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I believe the 'GetActiveUsers' service returns the list of users that have an active session (aka - are currently logged in to Thingworx) at time of invoking.
Definitely a cool feature if that is what you are looking for, but will give you inconsistent results if you are looking for an all-encompassing list of users.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi,
You can also use the GetGroupMembers service of the Users Group. Below is an example of a REST call in javascript
var params = {
headers: {'Accept':'application/json-compressed','Content-Type':'application/json'} /* JSON */,
password: password /* STRING */,
url: instanceURL+"/Thingworx/Groups/Users/Services/GetGroupMembers" /* STRING */,
content: {} /* JSON */,
username: username /* STRING */,
};
// result: JSON
var usersJSON = Resources["ContentLoaderFunctions"].PostJSON(params);
Veronica
