Yammer API - List of groups for each user - yammer

I would like to get the list of groups that every user in the yammer instance belongs to. Currently it looks like the user object from both the data export API and the REST API do not contain a section with which groups each user belongs to. I know that there is a way to see what groups I belong to in the REST API, but that does not seem to give the groups for every user in the yammer instance.
Does anybody know if there is a way to get the list of all groups that each and every user in the yammer instance belongs to using either of the APIs?
Thanks!

A fairly easy way to do this would be to get the list of groups:
https://www.yammer.com/api/v1/groups.json
And then iterate over the group IDs returned to get the list of members of each group:
https://www.yammer.com/api/v1/groups/{group id}/members.json
Bear in mind, unless you have proper access you may not be able to see into private groups to get the list of members.

I found that if you have the full list of group IDs (either from the data export api or the rest api), you can use those group IDs to individually query, and page through the following endpoint on the REST API.
https://www.yammer.com/api/v1/users/in_group/[group_id].json?page=[page_number]

Related

Assigned to field in Case Table- Servicenow

In Case Form,Based on the group selected in Assignment group field ,the assigned to field is listing some users which belongs to it in CRM UI.
Now I want to retrieve the same users using normal REST API. Please suggest REST API to list the users based on a group.
Users linked to groups is stored in table sys_user_grmember. In the example I search for all Users in Group named "Application Development".
GET https://YOURINSTANCE.service-now.com/api/now/table/sys_user_grmember?sysparm_query=%22groupSTARTSWITHApplication%20Development%22&sysparm_limit=10
You can easily test the REST Api with the rest api explorer from SNOW: https://YOURINSTANCE.service-now.com/nav_to.do?uri=%2F$restapi.do
Can you give more info on the exact requirement, so i can be more precise?
As far as I know, you can create a rest message to get the users inside a group and show the list wherever you want.
This would require three things from your side.
a) Creating a rest message in Snow.
b) Creating a script includes calling the rest message.
c) A client script or trigger which initiates the rest call using client script.
Hope this helps.
Regards.

How can I search users by id

Correct me if I'm wrong but it appears that the admin-sdks's Users>list operation doesnt support searching users by ID (According to the docs here).
For example I use the Members api to get all the members of a given group. It returns a list or User Ids.
The only way to fetch data about those users is to call the get operation for each user. Seems pretty inefficient to me.
How come this functionality is not implemented (or perhaps I'm missing something)?
Search feature means you have a pattern and you want the list of all entities which relate to given pattern. It assumes you don't have the unique id of the entity you need. The output of search feature is the list of unique ids with optional additional minimal information which matches to search pattern. To get full information of the individual entity, you need to use unique id and use get information feature.
However, if you already have the unique id, then you don't need the search function. Directly use get information feature.
So google has provided sufficient functionality. If you already have userid, why using search call, use retrieve user call directly.

Mailchimp API - Method to get list of campaigns per user

I am using the Mailchimp API to collect info about list members (per email), and campaigns. However, I am not seeing a method to collect a list of campaigns that were sent to a specific email/list member.
Am I missing something?
First get list of all campains. And in loop of campains, and check if user exists in list. mailchimp provide api ti check if user contains in list.

Group ID for "All Company" Group in Yammer

I'm using the Yammer REST API to fetch data about messages posted in our Yammer network.
I can get messages from any group by passing the group ID.
But I don't know the group ID for the All Company group.
How can I find the group ID for the All Company group?
Use https://www.yammer.com/api/v1/messages/general.json.
You can see the other built-in feed type endpoints such as my_feed and private here: http://developer.yammer.com/restapi/#rest-messages
Yammer API POST call with parameter group_id allows posting message to a group, but not to AllCompany.
Same POST call with parameter feed_id allows posting message to a group and to AllCompany group (feed).
Use feed_id instead of group_id and all as id.
first get all the groups
using this API
https://www.yammer.com/api/v1/groups.json
in that group array check out the group full name. and you can use id of that array item. that will be your group id.
Use https://www.yammer.com/api/v1/messages.json.
This will give All public messages in the user’s (whose access token is being used to make the API call henceforth referred to as current user) Yammer network. Corresponds to “All” conversations in the Yammer web interface.
also refer answer from by #mleroy in earlier message.
use "all" as feed id for All company group.
I know this post is a bit old but it might help someone.
On every group page of Yammer, there is a section called Access Options on the right had side.
Click on the link "Embed this group in your side". It will give you JS code for the group which will include Feed ID as well.
Using this api you can able access all messages
https://www.yammer.com/api/v1/messages.json
from the response json you can see the group id of all message groups.You can notice that 'group_created_id' is null for all company group.
I dont think that group id for all company is 'All',because that parameter is an integer,So just pass null.
Its a bit weird, but I found out that the group_created_id field is null when the message belongs to "All Company"
So you can use messages.json as mentioned before to get all public messages,
or if you want to search for messages by groups, you can get a list of groups ids and use :
https://www.yammer.com/api/v1/messages/in_group/{group-id}.json
and after that use messages.json, and go over the messages and search for those who has the field group_created_id set as null
Hope it will help someone someday :P
I had a similar requirement of embedding Yammer All company feed for which I needed the Feed ID and this worked for me-
feedType: "general",
feedId: "all"
Hope this helps!

Is it possible to hide content for one specific user group?

I know we can show content based on a users access level using Joomla ACL, but is it possible to show content to all users except for one specific group? If so, how?
I've tried creating an access level called news that includes all groups except no_news group then assigned my module access level of news.
Unfortunately users belonging to the no_news group were able to see the content. Any suggestions?
The no_news class is inherited from registered.
Is your no_news group inherited from Public? If so, exclude Public group from NEWS access level. Basically the idea is that if the parent group has access, then all child groups will also have.

Resources