I am trying to use PowerShell to get the date of the last message submitted to a Team's chat.
Looking around, I found this blog post, which indicates that I should be able to use the LastModifiedTime property (using Get-UnifiedGroup and Get-MailboxFolderStatistics), but in my case, that value does not represent the date of the last post (it is off by more than a year).
How can I actually get this data?
I discovered the -IncludeOldestAndNewestItems parameter in Get-EXOMailboxFolderStatistics cmdlet. That seems to be reporting the correct data (in NewestItemReceivedDate).
Can you try calling List channel messages graph API. This should return the list of messages in the channel with timestamp.
You can pick the latest message from the list. Usually the first one in the list is the most recent one.
Related
I see that Sentry has an API to list the events in a project: https://docs.sentry.io/api/events/get-project-events/
But there doesn't seem to be any filter for start and end times here to get say, the events that occurred in the last one hour.
Is there any such filter available that I'm missing?
I think what you want is to first search by issues using https://docs.sentry.io/api/events/get-project-group-index/, and then get the latest event for each issue (if you need the level of detail) using https://docs.sentry.io/api/events/get-group-events-latest/
The first endpoint allows you to add ?query= at the end to use the search queries you're used from the UI. You can filter by timerange over lastSeen there.
It is related to this feature request:
Show only events which match filter in Issues screen. (also event &
user count)
https://github.com/getsentry/sentry/issues/15189
To meet our rentention policy, we need to delete messages older than a specific time from yammer. One option is to use powershell which is given here! I am looking for a REST API solution to solve this problem.
The Powershell script actually uses a REST endpoint to delete the messages they want to delete. It's documented here: https://developer.yammer.com/docs/messagesid
The trick is to determine the message IDs for all messages posted before the given date. The script starts by iterating through a CSV exported by the Data Export API, documented here: https://developer.yammer.com/docs/data-export-api. The script iterates until it has collected all the message IDs for messages older than the given date. After it has all the message IDs, it has a loop that calls the aforementioned delete messages REST API endpoint for each of the collected message IDs.
You can do the above with REST APIs and your preferred programming language.
I'm currently working on requesting a list of events between 2 dates via Microsoft Live's REST API. I am able to pull back a list of events through the following request URL:
https://apis.live.net/v5.0/me/events
However, this returns a list of events that does not have any specific date frame. For example, I'd want to call a request similar to this:
https://apis.live.net/v5.0/me/events?startDate=2015-02-15&endDate=2015-03-15
I haven't been able to find any useful Microsoft documentation in their disorganized mess of "documentation", so my questions are:
1 - What changes need to be made to the first endpoint above for something like this to work?
2 - What time format does Microsoft use for this kind of request?
Thanks!
I finally found the answer in the middle of a Microsoft documentation page.
Get a limited number of events based on their starting and ending times in Coordinated Universal Time (UTC) format by using the start_time and end_time parameters
To answer my own questions:
#1 - The following endpoint works:
https://apis.live.net/v5.0/me/events?start_time=2015-02-15T00:00:00Z&end_time=2015-03-15T00:00:00Z
#2 - The time format is as follows:
yyyy-MM-dd'T'HH:mm:ss'Z'
Using the Graph API Explorer, and using GET /me/inbox, I can get a list of messages.
I was wondering how to limit them to messages from the past day, for example?
You can use time based paging this way:
me/inbox?since=1372395600
It relies on the updated_time (unix timestamp) parameter of an inbox thread. This way you could get all the threads updated with a message at a time since yesterday, for example.
Right now I am working on a project to fetch data from a SharePoint list using SOAP API. I tried and successfully fetches the complete list, but now I want to fetch some specific data that is updated after a specific date.
Is this possible to fetch such data using SOAP query. I can see last update filed when I view single item at the bottom. Is this some how possible to use that filed?
Yes you can use the Web Services to do lot of things just like filtering a list result. I don't know which language you use, but with JavaScript you can look at these two frameworks that should help you:
http://aymkdn.github.io/SharepointPlus/ : easy way to create your queries (I created it)
http://spservices.codeplex.com/ : the most popular framework but less easy to use (it's my point of view)
You can also look at the documentation on MSDN (the param to use is query): http://msdn.microsoft.com/en-us/library/lists.lists.getlistitems.aspx
At last found the answer,
The last update date and time can be retrieved from the list column "Modified".
The soap response will have the value in the attribute "ows_Modified".
Muhammad Usman