Fetching "cancelled" events through the Office 365 REST API - calendar

I'm having trouble figuring out a way to fetch "cancelled" events on Office 365. It seems like a pretty basic thing to do, however none of my attempts at figuring out how to do so have worked.
Reading the Office 365 API documentation, I can see that the Event resource has an IsCancelled boolean attribute, which should show true if the event was cancelled/deleted.
I've tried the numerous methods of getting events through the API with no luck. It seems that once an event is cancelled, it simply is removed from the returned results.
I also see that I can use OData query parameters to try and filter the results of the event fetching response, so I even tried setting a $filter=IsCancelled eq true query parameter on the request, but all I got back was a response with an empty data array. :/
Is there something obvious I'm missing? The documentation's pretty light here.

Today, the calendar REST APIs match Outlook behavior. So https://outlook.office365.com/api/v1.0/Me/Events?$filter=isCancelled%20eq%20true only returns deleted events that appear on a user's Outlook as "Cancelled: " in the subject line. Once a user removes a cancelled meeting from their calendar, it won't be returned. For meeting series, we don't have a way to currently return only the instances that were deleted.
Returning deleted events (single meetings, series, and specific instances of a series) is on our roadmap, as multiple partners have requested it. However, I don't have a timeline to share with you at the moment.

Related

Clarification regarding gmail message apis

What is the Order in which the message list returns the messages. i.e message.list api? Whether it is based on the message timestamp or any other field.
If I want to sync a very large mailbox and I fire a message.list api, then I get a pageToken for pagination, so how long is the pageToken valid? For eg if I get a page token X and I fire the api to fetch the next page after 6-7 hours will I still get the expected response.
As this pageToken validity is not mentioned in the gmail api doc, any approach on how can full mail sync be done if the service which is syncing the mailbox restarts.
If I remember correctly the order of returned emails is "newest first, to older ones". I don't believe a pageToken would expire in 6-7 hours but why would you wait for so long to get the next page? If you care about getting new emails a few hours later then you want to use the history methods, starting with startHistoryId that you get from your full load.

Microsoft Graph API subscription triggers same email with different IDs

I have a weird hard-to-replicate issue with Graph API and Outlook subscription endpoints. A user is authorised in my app and subscription is created for me/messages with change type created.
Everything works fine in 99% of the cases, but once in a while the endpoint is triggered several times with the same email. There is no changes to the email or any other part of the request, except ID, even timestamp. I have no idea how to replicate it consistently and/or fix an issue. Is there any scenario where Graph API would send the same message twice with slightly different IDs? It looks like they are sequentially generated IDs too, as they differ by 1-3 characters in the very end.

Creating and modifying calendar subscriptions using the google API

I want the ability to create a calendar using the calendar API and issue one-way syncs to this calendar when changes happen on my end. I do not want the user to be able to make changes, i.e., it should work like a subscription but instead of google pulling changes, I want to push changes. This way users can get the changes in real time as opposed to having to wait for a long time to see updates.
I looked through the APIs and I could find no way to a) create subscription b) force subscribed calendar refresh. I also tried creating a secondary calendar and setting ACLs on it for the current user but this also doesn't work, I get the following error:
"reason": "cannotChangeOwnAcl",
"message": "Cannot change your own access level."
Is there a way to accomplish this with the API?

Getting history events for just new messages?

I'd like to monitor a users gmail account for new messages and take an appropriate action. Is there a way to fetch the history events for just new messages but NOT for things like starring an email or changing its labels, etc.?
So I ended up using messages.list and storing the timestamp of the most recent message. Then on subsequent calls to messages.list I'd supply a query of "after:theMostRecentTimestampIKnowOf" to find new messages since the last time we synced.
Another route I've seen done, is if you have the ability to add a filter (e.g. user's can do that, or use the Google Admin SDK for Google Apps users, or do it through HTML/DOM hacking) then you can simply setup a filter to apply a label to all new messages. Then just messages.list(labelId=THAT_LABEL) when you do your polling (and remove it after you process them).
There is not any ability now to filter history based on change type, though it's something that would be nice to provide at some point.

Pulling facebook and twitter status updates into a SQL database via Coldfusion Page

I'd like to set up a coldfusion page that will pull the status updates from my own facebook account and twitter accounts and put them in a SQL database along with their timestamps. Whenever I run this page it should only grab information after the most recent time stamp it already has within the database.
I'm hoping this won't be too bad because all I'm interested in is just status updates and their time stamps. Eventually I'd like to pull other things like images and such, but for a first test just status updates is fine. Does anyone have sample code and/or pointers that could assist me in this endeavor?
I'd like it if any information relates to the current version of the apis (twitter with oAuth and facebook open graph) if they are necessary. Some solutions I've seen involve the creation of a twitter application and facebook application to interact with the APIs; is that necessary if all I want to do is access a subset of my own account information? Thanks in advance!
I would read the max(insertDate) from the database and if the API allows you, only request updates since that date. Then insert those updates. The next time you run you'll just need to get the max() of the last bunch of updates before calling for the next bunch.
You could run it every 5 minutes using a ColdFusion scheduled task.
How you communicate with the API is usually using <cfhttp />. One thing I always do is log every request and response, either in a text file, or in a database. That's can be invaluable when troubleshooting.
Hope that helps.
Use the cffeed tag to pull RSS feeds from Twitter and Facebook. Retain the date of the last feed scan somewhere (application variable or database) and loop over the feed entries. Any entry older than last scan is ignored, everything else gets committed. Make sure to wrap cffeed in a try/catch, as it will throw errors if the service is down (ahem, twitter) As mentioned in other answers, set it up as a scheduled task.
<cffeed action="read" properties="feedMetadata" query="feedQuery"
source="http://search.twitter.com/search.atom?q=+from:mytwitteraccount" />
Different approach than what you're suggesting, but it worked for us. We had two live events, where we asked people to post to a bespoke Facebook fan page, or to Twitter with a hashtag we endorsed for the event in realtime. Then we just fetched and parsed the RSS feeds of the FB page, and the Twitter search results, extracting what was new, on a short interval... I think it was approximately every three minutes. CFFEED was a little error-prone and wonky, just doing a CFHTTP get of the RSS feeds, and then processing the CFHTTP.filecontent struct item as XML worked fine
.LAG

Resources