Mailchimp API - Method to get list of campaigns per user - mailchimp-api-v3.0

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.

Related

Get Mailchimp list of unsubscribed users for the last month from API

I want to receive the list of unsubscribed users from Mailchimp mailing list from Marketing API. I use this endpoint:
https://{{dc}}.api.mailchimp.com/3.0/lists/{{list_id}}/activity
but it returns only the count of subscribed/unsubscribed users. I want also to retrieve email addresses of all unsubscribed users.
Endpoints with campaigns reports doesn't seems to retrieve such a data too.
Is this possible? Is there any other endpoint that can return my demands?
Also it would be helpful if the results will be trimmed by the date - in my case last month.
Thanks for help.
OK I have figured it out. It was this endpoint:
https://{{dc}}.api.mailchimp.com/3.0//lists/{list_id}/members?status=unsubscribed&since_last_changed={{ISO_DATE}}

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 do I get calendar_id from Google Calendar API

I know you can get it on the settings page.
I have multiple calendars on a single account.
I can get the names back with
service.list_calendar_lists(page_token: page_token)
but how do I can the calendar ids associated with the names of the calendars
The structure that's returned from service.list_calendar_lists is a JSON that has an entry items
items is an array of calendar list items, and each array element includes id which is what you're asking for.
So something like
array_of_ids = service.list_calendar_lists(page_token: page_token)['items']map{|i| i['id']}
You can use CalendarList() with a GET request as shown in the Google Calendar API here. I tested this by retrieving my own calendar id by passing in the "primary" keyword as described in the documentation linked above.

Yammer API - List of groups for each user

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]

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!

Resources