Fetching only user's activity in a specific group - yammer

Is it possible to retrieve only user's activity in a specified group using Yammer REST API?
For example I can retrieve user's activity in a specific network using following query:
https://www.yammer.com/{network-name}/api/v1/messages/sent.json
It would be great if something like this can be done for group, because for now the only option I found is to use following query:
https://www.yammer.com/api/v1/messages/in_group/{group-id}.json
But it allows to retrieve all activity in a particular group, so I will need to do filter user's data by myself.

Related

ServiceNow API - How to get all users and all their attributes

I am trying to use the ServiceNow API for the first time and I need to get a list of all the users in the sys_user table with all of their available fields/attributes like date created, updated etc.
I tried GET request to this URI:
https://myinstance.service-now.com/api/now/table/sys_user
But the response only returns the Users and some of their attributes but not all of the ones I can see in the portal.
What is the correct URI to make the REST call to get all users and their fields/attributes?
I'm assuming you want to access SN API from another application? Cause if you want to do that from within SN, there is the GlideRecord server API you can use.
Now when you access the table API from external source, you do that through a registered user - depending on this user and their roles, you might see all or only some of the user attributes. Also, if you add specific Query Parameters to your request like sysparm_query or sysparm_fields, this will limit what you get.
ACLs (Access Control Lists) is the mechanism in ServiceNow restricting access to Table API. So I would encourage you to check there. Perhaps you will need to create a technical user with sufficient roles to access the data you need.
Also the REST API Explorer which is found in SN Navigator can be of help to quickly test your table queries.
Hope that helps a bit!
In general table api returns all the columns associated to the table unless until if you have specified the specific column list in sysparam_fields, can you please try in post man or try the same api call from rest api explorer in Servicenow to understand the behavior. H

Is it possible to track session duration for each user on Google Analytics?

I'm using Google Analytics to track user behavior. In order to get actionable insights, one thing I have to track is the session duration for users. Is it possible to track session duration for each user on Google Analytics by sending user-id?
With the User Explorer Report of GA you get an individual view of each user and the actions that he conducted on your website from the time of acquisition to the point of exist and at times to when the user comes back.
about the user id feature
User ID lets you associate a persistent ID for a single user with that user's engagement data from one or more sessions initiated from one or more devices.
Analytics interprets each unique user ID as a separate user, which provides a more accurate user count in your reports.
So setting user id is an internal field used by google for processing of your data. This is not a field you will be able to see so it will be hard for you to analytics things based upon this user id.
However you could send the userid with all the calls as a custom dimension this will enable you to add the dimension to your reports.

FreeSWITCH filter registrations

I have a multi tenant FreeSWITCH setup and I am trying to retrieve the registrations belonging to a particular tenant.
I am aware of the mod command show registrations described here which returns all the current registrations on the FreeSWITCH.
I am also aware of sofia status profile <profile name> reg described here which shows registrations on a particular profile. This won't help either as the profiles on my FreeSWITCH are shared by multiple tenants.
Is there a way I can retrieve the data through event socket for a specified tenant?
you can execute show registrations via ESL and retrieve its output. The second field is realm, which is basically the name of the tenant. So, you would get all the registrations, and later you can filter by realm name. Also in theory, you can get direct access to the registation SQL database and run the queries directly in it.
I have done something similar to this.
first get all the registration of profile using following command:
"api sofia status profile internal reg" using event socket
after this based on your need convert data into json and search based on realm and print the result.
Please refer sofia_presence_data list|status|rpid|user_agent [profile/]<user>#domain cmd.
Even if this doesn't work. You need to get register and unregister events from ESL and save it to common DB and retrieve the user data, which i think a much simpler way.

Is it possible to batch API calls to Gigya getUserInfo?

I have a script which is retrieving user info for a set of users in our account. First we're calling socialize.exportUsers to get all UIDs, then I'd like to retrieve user info for a subset of this. Currently I'm calling socialize.getUserInfo on each UID I want to retrieve, which is quite slow.
I'm wondering if there's a way to batch API calls together so I can retrieve user info for multiple UIDs with one call. I didn't find anything in their API documentation or Developer's Guide.
Thanks,
Scott
Unfortunately, Gigya does not currently not have API functionality that would allow you to retrieve user information back as a batch.
However, if you have an active contract with Gigya, then you should be able to contact Gigya support directly and request a user export. Gigya has an internal data migration process where they can extract all the users on an API key into a JSON file and then send you that file.

Yammer REST endpoint to get user by full name

I'm working on a migration Product that migrates data in to yammer. I want to match the user on source to user on target based on full name. How do I retrieve user from Yammer based on Full Name? There is one REST endpoint to get user by email. Is there something similar to this for user Full Name ?
It's not possible to do this with the User API as it only supports getting a user by ID or email. You might want to look at the Autocomplete API, but it might be quicker to use the Data Export API and find the user in the users.csv file. It's hard to provide recommendations when you don't explain what you app does.

Resources