Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X
Iam creating users, usergroups, organisation in runtime. But how to attach usergroup to one organisation using API or service ?
Solved! Go to Solution.
@AP_9587236 You can use REST API to trigger the service externally or use ThingWorx UI and add a helper service to a thing.
And you need the 'AddMember' service.
I've shot a quick sample video showcasing these two approaches.
I only noticed that the question was about adding groups, not users, after I've filmed the video, but that would be pretty much the same, besides changinf the "type" param value to "Group"
Hi @AP_9587236
If you tack this to the end of your ThingWorx url, you will see all the services that are exposed: /Organizations/Everyone/ServiceDefinitions/
Note this is for the Everyone organization, so you may need to change it.
Regards.
--Sharon
Yes, I am seeing these services. But how to call these services inside code ? This is not available in snippet also. When i tried this code, it is not working.
AddOrganizationalUnit({
parentName: "Testing Organization",
name: "TestingUnit"
});
And Iam not seeing Adding usergroup service in this list.
@AP_9587236 You can use REST API to trigger the service externally or use ThingWorx UI and add a helper service to a thing.
And you need the 'AddMember' service.
I've shot a quick sample video showcasing these two approaches.
I only noticed that the question was about adding groups, not users, after I've filmed the video, but that would be pretty much the same, besides changinf the "type" param value to "Group"