IBM Connections Service URL for Activity Stream - xpages

I am using the Social Business Toolkit (SBT) with the Extension Library.
Using the IBM documentation, I am struggling to find the service URL to get the updates from the activity stream (like what you see in the home page).
I am expecting to be able to do this but rather than get the users entries, get all entries that have been posted on their board/other users updates
new sbt.ConnectionsService("/profiles/atom/mv/theboard/entry/status.do?email=" +userBean.email);
Does anybody know it?

sbt.ConnectionsService is part of com.ibm.xsp.extlibx. That is different from the Social Business Toolkit SDK.
In order to read the entries from the activity stream using the SDK you can simply call ActivityStreamService.getAllUpdatesStream() or getActivityStreamEntries(String user, String group, String app, Map params) if you want to filter it.
See http://openntf.org/XSnippets.nsf/snippet.xsp?id=create-entry-in-activity-stream-from-xpages-via-the-social-sdk-and-oauth2

Related

Retrieve Azure AppInsights Live Metrics through API

There is an one year old question How can I retrieve through an API *Live Metrics* of Microsoft Application Insights about is it possible to pull LiveMetrics data that appInsights generate for the application trough some API
Right now i don't see anything live related in the official documentation - https://dev.applicationinsights.io/reference . And the answer for old question was also that there is no any way to get them.
But maybe someone knows if AppInsights team plans were changed in this year and they are working on that API?
It might be really useful to pull that data in realtime through API to own alerting\metrics system to process data from different microservices\applications and display them in aggregated way in realtime.
As example we can build something like OpServer has but based on different applications and their AppInsights data .
As right now there is no any way to get it
Note: I work in Application Insights team at Microsoft.
LiveMetrics data is not persistently stored anywhere, and there is no API to retrieve it. The data is collected only when someone is actively on the Live Metrics portal page. The moment browser window is closed, data is gone as well.
If your goal is to get metrics/other in real-time, then you can do that by implementing own ITelemetryProcessor. Most people use ITelemetryProcessor to "filter" out unwanted telemetry. But that is not a rule. All telemetry passes through TelemetryProcessor, and you can chose to filter the data or do something else with it. In your case you want to send it instantly to some real-time service. In fact, LiveMetrics (internally known as QuickPulse) is implemented as a TelemetryProcessor. (https://github.com/microsoft/ApplicationInsights-dotnet/blob/develop/WEB/Src/PerformanceCollector/Perf.Shared/QuickPulseTelemetryProcessor.cs#L158)
General doc about TelemetryProcessor:
https://learn.microsoft.com/en-us/azure/azure-monitor/app/api-filtering-sampling#create-a-telemetry-processor-c

How do i fetch only internal messages from O365 using Graph API

I wan't to fetch only messages that are only internal to organization.
Right now the way i see is fetch domains first then for each message see if from/sender domain belongs to that message , based on that differentiate.
But this is lengthy process and not a foolproof technique.
Is there any GRAPH API query i can use which readily provides this ?
It does not apear that the REST API queries for Office 365 includes this information directly in the messages. From the Version 2.0 And the Beta this is not included in message output.
However, it looks like you might be able to get it from the REST API via the headers.
Try the following query:
https://graph.microsoft.com/beta/me/messages?$select=internetMessageHeaders&$top=1
This takes top one messages and shows you the email header of the message.
In the header look for X-OriginatorOrg. The value should be the main domain of your organisation.
Alternatively you can look at the X-MS-Exchange-Organization-MessageDirectionalityheader. If the value here is Originating it should come from inside your own organisation.

How to transfer conversation from Bot to human agents? in ibm watson using node js

I have created watson chat bot which answers users FAQ's using Node js as a middle ware. but how can i transfer the conversation from bot to any human agent.
In this case, you need to know: Watson Conversation Service is one endpoint API, so, you can call the service and creates one condition in your backend for identifying if the user wants to be attended for one's Human Agents or anything that you want to do with yours application.
For example, you can see the Project by IBM Developer's inside Watson Developer Cloud called conversation-simple using Node.js.
You can simply create one #intent condition in your chatbot likes:
if bot recognizes #wantsHumanAgent
response: Do you want to talk with one Professional?
And creates one #entity with the values: yes or no, after it, try to create one child node with the condition:
if bot recognizes #yesOrNo:yes
response: Please wait! I'll pass you on to an attendant.
Or you can add the link for the user's talks with the Attendant too, like:
if bot recognizes #yesOrNo:yes
response: The link to talk with one Attendent is <a target="_blank" href="https://yourlink.com">Talk to one Professional!</a>.<br/><br/>
Obs.: You can add one custom code to creates your functions or do something in your application using this example as a base, and creates one custom code for what you want: Add in your chat one option to talk with Human Agents.
Note.: This is just some's suggestions to use based on good practices. You need to guide your user in your Virtual Assistant for one better Attendance.
See more examples to build with Watson Conversation Service.

How to grab user track info through spotify api

I recently just got through the beginning tutorial for creating a web app with the spotify api. https://developer.spotify.com/web-api/tutorial/. The tutorial was great for showing how to authenticate a user with oauth and log in a user.
The problem I am having is with the endpoint. I can't seem to figure out how to change the endpoint so that instead of displaying a users profile, I can see a list of a users track, better yet starred or top 10 tracks.
for a 10,000 view perspective of what I want to build is a app that would allow users to easily log in through their spotify account, take their stared or top tracks and push them to a radio that I am building with an raspberry pi.
I am new to working with the spotify api and working with api's in general so whatever advice would be awesome.
At the moment, there is no way to get the "starred"-playlist. (At least it's not documented)
I don't know what you mean with "Top 10 User tracks", since this doesn't exist as far as I know
To get a list of the account's current playlists, change the URL to:
https://api.spotify.com/v1/users/{user_id}/playlists
With this URL, you will get a list of simple-playlist-objects wrapped inside a paging-object. Now you can select one of the playlists (or loop through them) and fetch its track this way
NOTE:
If you also want to fetch private playlists, make sure you use the scope playlist_read_private

What sort of technologies were used to build NoHomophobes.com (real-time keyword tracker for Twitter)?

Do you think that they plugged directly into the Twitter API, or do they have some sort of backend which is what connects to the Twitter API directly instead? I didn't realize this kind of functionality was available to standard users.
Link: NoHomophobes.com
This site has a (short) piece about the technology used - it does seem like they're using the standard, public API:
"Using Twitter's API, tweets [...] were pulled, tracked and displayed
in real time
[...]
We couldn't simply pull every tweet ... A lot of research and testing
was conducted to determine which words and phrases to capture, as well
as what parameters the tweets had to follow in order to be funneled
onto the site"
Also, the site's own T&C's mention
This website contains a licensed real time display of Tweets
At a guess, they're effectively continually searching for certain terms in public tweets (as any Twitter client can do) and displaying the results.
Basically, the site uses the Twitter Streaming APIs which allow a persistent connection with Twitter. And as filtered tweets come through, it processes the data and delivers it to website users through web sockets via a 3rd party service called Pusher.

Resources