Attributes not present in response
Hi team,
I have couple of queries, could you please address those?
Query 1.
While fetching all the users, I am not getting groups associated to the users in the response.
url: https://api.smartsheet.com/2.0/users?include=groups
Note: I have referred the documents to include groups and I am sure that the users are associated to some group.
Query 2.
While fetching groups, I am not getting members associated with the groups in the response.
url: https://api.smartsheet.com/2.0/groups
Note: I am sure about members present in the group.
Could you please check into this as soon as possible ?
Thanks in Advance,
SP
Answers
-
Excerpt from documentation for query no 1:
When specified with a value of 'groups', response includes an array of groups (groupId, name, and description only) that the user is a member of.
Value: "groups"
Doc link: https://smartsheet.redoc.ly/tag/users#operation/list-users
-
Hi @SP Trial
I've tested these requests and I see the same thing that you do: including "groups" for List Users doesn't include groups. Based on the documentation it should show groups, as you've noted. I tested this and if you use Get Current User, it will show the associated groups, however getting a User based on their ID or getting a List of all users will not show groups.
I will raise this with our Support team to see if the documentation needs to be updated or if there is an issue with the API, and I'll follow-up on this post once we've determined the expected behaviour. Thank you for bringing this to our attention!
In regards to your Query 2, the URL you are using here (/groups) will list each Group but will not have an array of members within each group. To get this, you will want to find the Group ID, then use the following URL instead:
https://api.smartsheet.com/2.0/groups/{groupId}
Here's the API documentation on using Get Group to find users: https://smartsheet.redoc.ly/tag/groups#operation/get-group
I hope that helps in the meantime!
Cheers,
Genevieve
Need more help? 👀 | Help and Learning Center
こんにちは (Konnichiwa), Hallo, Hola, Bonjour, Olá, Ciao! 👋 | Global Discussions
-
Thank you @Genevieve P for the reply.
For query number 2, thank you for sharing it.
However, I have a requirement to get the members associated with the group in this api:
url: https://api.smartsheet.com/2.0/groups
If I use the api shared by you, then I have to make multiple single calls over the network to find the members associated with the group. I want to avoid this.
Hence can you check with your team if they can provide any flag that includes members in response of this api -> https://api.smartsheet.com/2.0/groups ?
Regards,
Gourav
-
@Genevieve P : Any update on query number 1?
-
Hi @SP Trial
You are correct that currently, the only way to successfully determine the list of members in each group is to make multiple, separate calls per-group. This is also the way the UI works, so I do not believe there is a way to get all of that data with one call.
I don't yet have an update, we're still investigating the expected behaviour of List Users with the parameter Include Groups. I'll post back on this thread once we have a definite answer, and I've provided your email to our Support team for any follow-up questions so they can contact you directly about this, as well.
Thanks,
Genevieve
Need more help? 👀 | Help and Learning Center
こんにちは (Konnichiwa), Hallo, Hola, Bonjour, Olá, Ciao! 👋 | Global Discussions
-
Ok, I will be waiting for an update.
-
I am still waiting for the response
-
Hi @SP Trial
I've checked in with our Support team and they confirmed that on August 4th they identified that the issue where Rest api "List Users" in the Smartsheet API with include=groups query parameter doesn't return group information is a current bug.
We don't have an ETA for when this may be resolved, but they are now aware of the issue and are looking into the cause, thank you for reporting it.
Because of this, there is no current way to return a list of each user's group by using List Users. You would need to first get the Group ID, then get that specific Group's members.
As a final note, the email address Support used to contact you is the same as this Community profile; if you didn't receive an email on July 30th, August 3rd, then again on August 4th, please check your junk or spam folders.
Thank you!
Genevieve
Need more help? 👀 | Help and Learning Center
こんにちは (Konnichiwa), Hallo, Hola, Bonjour, Olá, Ciao! 👋 | Global Discussions
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.9K Get Help
- 441 Global Discussions
- 139 Industry Talk
- 471 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 68 Community Job Board
- 496 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives