cancel
Showing results for 
Search instead for 
Did you mean: 

Adding users to multiple groups in EP5 REST API

Ryan_Wakefield
World-Class Innovator
World-Class Innovator

So I was reading through the documentation and I noticed from what it appears to me that you can only add a user to a single user group at a time. My guess is that this is an incorrect understanding, but I wanted to ask anyways.

 

If you can add a user to multiple groups, can the documentation please be updated to reflect examples of doing so? And the same goes vice versa for the adding multiple users to a user group?

 

Thanks.

1 ACCEPTED ANSWER

Tyler_Conn
Content Contributor
Content Contributor

Hey Ryan!

 

You can indeed use the '/users/user-groups?userId={user-id}' request with the example body similar to the one below: 

{  "items": [    {      "userGroupId": "100",      "userId": "101"    },    {      "userGroupId": "205",      "userId": "101"    },    {      "userGroupId": "300",      "userId": "101"    }  ]}

 

 

I also threw a card in our backlog to update the Programmer's Guide to be a little more specific with our examples. 

 

Let me know if that helps or if you have any additional questions. 

 

Tyler Conn
Product Owner
Configuration Services and Change Control

View answer in original post

2 REPLIES 2

Tyler_Conn
Content Contributor
Content Contributor

Hey Ryan!

 

You can indeed use the '/users/user-groups?userId={user-id}' request with the example body similar to the one below: 

{  "items": [    {      "userGroupId": "100",      "userId": "101"    },    {      "userGroupId": "205",      "userId": "101"    },    {      "userGroupId": "300",      "userId": "101"    }  ]}

 

 

I also threw a card in our backlog to update the Programmer's Guide to be a little more specific with our examples. 

 

Let me know if that helps or if you have any additional questions. 

 

Tyler Conn
Product Owner
Configuration Services and Change Control

Thank you Tyler! I greatly appreciate this and look forward to seeing the examples get better and clearer. This helps me to understand the functionality a lot more.