从重复序列中修改单个事件不会反映在从 Rest API 读取的数据中

Modifying single occurrence from recurring series is not reflected in the data read from the Rest API

当您在 Office365 Outlook 中创建发生的事件并修改任何单个事件(编辑事件)时,更改永远不会反映在从 REST API 消耗的数据中。没有创建重复异常(新事件)并且系列主控没有更改单个字段。

预期的行为是 SeriesMaster 包含异常列表(例如按日期),并且每个异常都被创建为新的单独事件,link 到循环头(例如:SeriesMasterId)。

{
    "@odata.id ": "https: //outlook.office365.com/api/v1.0/Users('----')",
    "@odata.etag": "----",
    "Id": "----",
    "ChangeKey": "----",
    "Categories": [],
    "DateTimeCreated": "2015-05-27T13:36:11.9330924Z",
    "DateTimeLastModified": "2015-05-27T13:44:16.2212804Z",
    "Subject": "EVRY DAY INTERVAL WITH EXCEPTIONS",
    "BodyPreview": "",
    "Body": {
        "ContentType": "HTML",
        "Content": "Example content"
    },
    "Importance": "Normal",
    "HasAttachments": false,
    "Start": "2015-04-28T00:00:00Z",
    "StartTimeZone": "UTC",
    "End": "2015-04-29T00:00:00Z",
    "EndTimeZone": "UTC",
    "Reminder": null,
    "Location": {
        "DisplayName": "",
        "Address": {
            "Street": "",
            "City": "",
            "State": "",
            "CountryOrRegion": "",
            "PostalCode": ""
        },
        "Coordinates": {
            "Accuracy": "NaN",
            "Altitude": "NaN",
            "AltitudeAccuracy": "NaN",
            "Latitude": "NaN",
            "Longitude": "NaN"
        }
    },
    "ResponseStatus": {
        "Response": "Organizer",
        "Time": "0001-01-01T00:00:00Z"
    },
    "ShowAs": "Free",
    "IsAllDay": true,
    "IsCancelled": false,
    "IsOrganizer": true,
    "ResponseRequested": true,
    "Type": "SeriesMaster",
    "SeriesMasterId": null,
    "Attendees": [],
    "Recurrence": {
        "Pattern": {
            "Type": "Daily",
            "Interval": 2,
            "Month": 0,
            "Index": "First",
            "FirstDayOfWeek": "Sunday",
            "DayOfMonth": 0
        },
        "Range": {
            "Type": "NoEnd",
            "StartDate": "2015-04-28T00:00:00+03:00",
            "EndDate": "0001-01-01T00:00:00Z",
            "NumberOfOccurrences": 0
        }
    },
    "Organizer": {
        "EmailAddress": {
            "Address": "----",
            "Name": "----"
        }
    },
    "iCalUId": "----",
    "WebLink": "----"
}

任何人都可以对此有所了解吗?目前,从 Rest API 消耗的整个 Recurrence 对象看起来(为此道歉)不完整且无用(但我在每一步都遇到了障碍)。

还有什么地方可以直接向 API 的开发团队报告问题?

Recurrence 对象中实际上并未公开异常和事件。为了查看个别事件或异常,您需要使用 CalendarView 端点。这会导致 Exchange 扩展指定时间 window 的重复事件,并且 returns 个别事件或例外。这是必要的,因为个人 occurrences/exceptions 在日历上并不作为实际事件存在,它们源自系列大师。如果您只是在 /Me/Events 上执行 GET,您将永远看不到它们!

例如,我在我的日历上创建了一个重复发生的事件,然后我修改了一个发生在不同的时间(这使它成为一个例外)。

/Me/Events 上执行 GET:

{
  "@odata.context": "https://outlook.office365.com/api/v1.0/$metadata#Me/Events",
  "value": [
    {
      "@odata.id": "https://outlook.office365.com/api/v1.0/Users('jason@johnstonian.onmicrosoft.com')/Events('AAMkADRmMDExYzhjLWYyNGMtNDZmMC1iZDU4LTRkMjk4YTdjMjU5OABGAAAAAABp4MZ-5xP3TJnNAPmjsRslBwAoPBSqxXQOT6tuE0pxCMrtAAAAAAENAAAoPBSqxXQOT6tuE0pxCMrtAAC5xYC1AAA=')",
      "@odata.etag": "W/\"KDwUqsV0Dk+rbhNKcQjK7QAAucdOPw==\"",
      "Id": "AAMkADRmMDExYzhjLWYyNGMtNDZmMC1iZDU4LTRkMjk4YTdjMjU5OABGAAAAAABp4MZ-5xP3TJnNAPmjsRslBwAoPBSqxXQOT6tuE0pxCMrtAAAAAAENAAAoPBSqxXQOT6tuE0pxCMrtAAC5xYC1AAA=",
      "ChangeKey": "KDwUqsV0Dk+rbhNKcQjK7QAAucdOPw==",
      "Categories": [],
      "DateTimeCreated": "2015-05-28T13:39:06.310974Z",
      "DateTimeLastModified": "2015-05-28T13:39:21.0300106Z",
      "Subject": "Exception test",
      "BodyPreview": "​",
      "Body": {
        "ContentType": "HTML",
        "Content": "<html>\r\n<head>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">\r\n<style type=\"text/css\" style=\"display:none;\"><!-- P {margin-top:0;margin-bottom:0;} --></style>\r\n</head>\r\n<body dir=\"ltr\">\r\n<div id=\"divtagdefaultwrapper\" style=\"font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;\">\r\n<p>​<br>\r\n</p>\r\n</div>\r\n</body>\r\n</html>\r\n"
      },
      "Importance": "Normal",
      "HasAttachments": false,
      "Start": "2015-05-28T20:00:00Z",
      "StartTimeZone": "Eastern Standard Time",
      "End": "2015-05-28T20:30:00Z",
      "EndTimeZone": "Eastern Standard Time",
      "Reminder": 15,
      "Location": {
        "DisplayName": "My Office",
        "Address": {
          "Street": "",
          "City": "",
          "State": "",
          "CountryOrRegion": "",
          "PostalCode": ""
        },
        "Coordinates": {
          "Accuracy": "NaN",
          "Altitude": "NaN",
          "AltitudeAccuracy": "NaN",
          "Latitude": "NaN",
          "Longitude": "NaN"
        }
      },
      "ResponseStatus": {
        "Response": "Organizer",
        "Time": "0001-01-01T00:00:00Z"
      },
      "ShowAs": "Busy",
      "IsAllDay": false,
      "IsCancelled": false,
      "IsOrganizer": true,
      "ResponseRequested": true,
      "Type": "SeriesMaster",
      "SeriesMasterId": null,
      "Attendees": [],
      "Recurrence": {
        "Pattern": {
          "Type": "Daily",
          "Interval": 1,
          "Month": 0,
          "Index": "First",
          "FirstDayOfWeek": "Sunday",
          "DayOfMonth": 0
        },
        "Range": {
          "Type": "EndDate",
          "StartDate": "2015-05-28T00:00:00-04:00",
          "EndDate": "2015-06-04T00:00:00-04:00",
          "NumberOfOccurrences": 0
        }
      },
      "Organizer": {
        "EmailAddress": {
          "Address": "jason@johnstonian.onmicrosoft.com",
          "Name": "Jason Johnston"
        }
      },
      "iCalUId": "040000008200E00074C5B7101A82E008000000006CACEEAA4B99D0010000000000000000100000009478C61D36C90847B5F3C126ACB0A17E",
      "WebLink": "https://outlook.office365.com/owa/?ItemID=AAMkADRmMDExYzhjLWYyNGMtNDZmMC1iZDU4LTRkMjk4YTdjMjU5OABGAAAAAABp4MZ%2F5xP3TJnNAPmjsRslBwAoPBSqxXQOT6tuE0pxCMrtAAAAAAENAAAoPBSqxXQOT6tuE0pxCMrtAAC5xYC1AAA%3D&exvsurl=1&viewmodel=ICalendarItemDetailsViewModelFactory"
    }
  ]
}

在发生异常的那一天在 /Me/CalendarView 上执行 GET(注意 "Type": "Exception" 字段):

GET /Me/CalendarView?startDateTime=2015-05-30T04:00:00Z&endDateTime=2015-05-31T04:00:00Z

{
  "@odata.id": "https://outlook.office365.com/api/v1.0/Users('jason@johnstonian.onmicrosoft.com')/Events('AAMkADRmMDExYzhjLWYyNGMtNDZmMC1iZDU4LTRkMjk4YTdjMjU5OAFRAAgI0miCtL1AAEYAAAAAaeDGf_cT90yZzQD5o7EbJQcAKDwUqsV0Dk_rbhNKcQjK7QAAAAABDQAAKDwUqsV0Dk_rbhNKcQjK7QAAucWAtQAAEA==')",
  "@odata.etag": "W/\"KDwUqsV0Dk+rbhNKcQjK7QAAucdOPw==\"",
  "Id": "AAMkADRmMDExYzhjLWYyNGMtNDZmMC1iZDU4LTRkMjk4YTdjMjU5OAFRAAgI0miCtL1AAEYAAAAAaeDGf_cT90yZzQD5o7EbJQcAKDwUqsV0Dk_rbhNKcQjK7QAAAAABDQAAKDwUqsV0Dk_rbhNKcQjK7QAAucWAtQAAEA==",
  "ChangeKey": "KDwUqsV0Dk+rbhNKcQjK7QAAucdOPw==",
  "Categories": [],
  "DateTimeCreated": "2015-05-28T13:39:20.9676251Z",
  "DateTimeLastModified": "2015-05-28T13:39:20.9676252Z",
  "Subject": "Exception test",
  "BodyPreview": "​",
  "Body": {
    "ContentType": "HTML",
    "Content": "<html>\r\n<head>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">\r\n<style type=\"text/css\" style=\"display:none;\"><!-- P {margin-top:0;margin-bottom:0;} --></style>\r\n</head>\r\n<body dir=\"ltr\">\r\n<div id=\"divtagdefaultwrapper\" style=\"font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;\">\r\n<p>​<br>\r\n</p>\r\n</div>\r\n</body>\r\n</html>\r\n"
  },
  "Importance": "Normal",
  "HasAttachments": false,
  "Start": "2015-05-30T20:30:00Z",
  "StartTimeZone": "Eastern Standard Time",
  "End": "2015-05-30T21:00:00Z",
  "EndTimeZone": "Eastern Standard Time",
  "Reminder": 15,
  "Location": {
    "DisplayName": "My Office",
    "Address": {
      "Street": "",
      "City": "",
      "State": "",
      "CountryOrRegion": "",
      "PostalCode": ""
    },
    "Coordinates": {
      "Accuracy": "NaN",
      "Altitude": "NaN",
      "AltitudeAccuracy": "NaN",
      "Latitude": "NaN",
      "Longitude": "NaN"
    }
  },
  "ResponseStatus": {
    "Response": "Organizer",
    "Time": "0001-01-01T00:00:00Z"
  },
  "ShowAs": "Busy",
  "IsAllDay": false,
  "IsCancelled": false,
  "IsOrganizer": true,
  "ResponseRequested": true,
  "Type": "Exception",
  "SeriesMasterId": "AAMkADRmMDExYzhjLWYyNGMtNDZmMC1iZDU4LTRkMjk4YTdjMjU5OABGAAAAAABp4MZ-5xP3TJnNAPmjsRslBwAoPBSqxXQOT6tuE0pxCMrtAAAAAAENAAAoPBSqxXQOT6tuE0pxCMrtAAC5xYC1AAA=",
  "Attendees": [],
  "Recurrence": null,
  "Organizer": {
    "EmailAddress": {
      "Address": "jason@johnstonian.onmicrosoft.com",
      "Name": "Jason Johnston"
    }
  },
  "iCalUId": "040000008200E00074C5B7101A82E00807DF051E6CACEEAA4B99D0010000000000000000100000009478C61D36C90847B5F3C126ACB0A17E",
  "WebLink": "https://outlook.office365.com/owa/?ItemID=AAMkADRmMDExYzhjLWYyNGMtNDZmMC1iZDU4LTRkMjk4YTdjMjU5OAFRAAgI0miCtL1AAEYAAAAAaeDGf%2BcT90yZzQD5o7EbJQcAKDwUqsV0Dk%2BrbhNKcQjK7QAAAAABDQAAKDwUqsV0Dk%2BrbhNKcQjK7QAAucWAtQAAEA%3D%3D&exvsurl=1&viewmodel=ICalendarItemDetailsViewModelFactory"
}

另外,这是一个直接向我们报告问题的好论坛。只要您使用 outlook-restapi 标记,我们就会看到! :)