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

Community Tip - You can change your system assigned username to something more personal in your community settings. X

how to attach usergroup to one organisation using API

AP_9587236
17-Peridot

how to attach usergroup to one organisation using API

Iam creating users, usergroups, organisation in runtime. But how to attach usergroup to one organisation using API or service ? 

AP_9587236_0-1652266141333.png

 

ACCEPTED SOLUTION

Accepted Solutions

@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"

 

https://www.youtube.com/watch?v=oh0lfq0TYSE

View solution in original post

3 REPLIES 3
slangley
23-Emerald II
(To:AP_9587236)

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_0-1652355938934.png

 

@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"

 

https://www.youtube.com/watch?v=oh0lfq0TYSE

Announcements


Top Tags