簡體   English   中英

Microsoft Graph API Calendar API Null SeriesMasterId

[英]Microsoft Graph API Calendar API Null SeriesMasterId

解決方法如下!

這是我的朋友們,是一個漂亮的 msft 圖 api 調用,它過濾了一個非空的 SeriesMasterId 的前 50 個日歷結果! 另請記住,如果未定義此前 50 個過濾器,則返回的 json 僅顯示日歷中與您的查詢匹配的前10 個結果

https://graph.microsoft.com/v1.0/me/calendarView?startDateTime=2015-10-20T10:13:32-07:00&endDateTime=2016-10-20T10:13:32-07:00&$select=subject,type,seriesMasterId&$top=50&$filter=seriesMasterId ne null

下面的原帖

我在使用 Microsoft Graph API 檢索用於重復日歷事件的SeriesMasterId時遇到問題。 我正在使用通過我的 @{alias}.microsoft.com 帳戶登錄的Microsoft Graph Explorer進行測試,因為我目前是 Microsoft 員工。 對於我的重復事件:/當我進行 REST 調用時,SeriesMasterId 始終返回為 null。

這是電話:

https://graph.microsoft.com/v1.0/me/events

感謝您的時間和任何關於為什么我得到這個 null SeriesMasterId 或在您的用例中為此調用返回什么的任何反饋,非常感謝!

這里獲取 ISO 8601 時間戳。

使用調用過濾如下系列時,我也得到以下結果。

https://graph.microsoft.com/v1.0/me/calendarView?startDateTime=2016-09-30T15:57:28-07:00&endDateTime=2016-10-20T10:13:32-07:00

結果

{
            "@odata.etag": "W/\"KD/rRxyX+ESoOfWCZfnfFwAANhX0Bw==\"",
            "id": "AAMkADc5NzQyYWI2LWMxOTctNDRmZi05ZTA3LWE3NmRmYmY1MDQ0MgBGAAAAAADXlwbV2STsRLeDUWHghS8MBwDHXzszvWCLTrbQs5TTKyesAAAAtujXAAAoP_tHHJf4RKg59YJl_d8XAAAEs3bpAAA=",
            "createdDateTime": "2015-09-21T16:45:22.8816871Z",
            "lastModifiedDateTime": "2015-10-02T15:47:15.0711136Z",
            "changeKey": "KD/rRxyX+ESoOfWCZfnfFwAANhX0Bw==",
            "categories": [],
            "originalStartTimeZone": "Pacific Standard Time",
            "originalEndTimeZone": "Pacific Standard Time",
            "responseStatus": {
                "response": "none",
                "time": "0001-01-01T00:00:00Z"
            },
            "iCalUId": "040000008200E00074C5B7101A82E00800000000F07EA63A52F4D001000000000000000010000000FF2DCB149338304FB698D41CCC6A4BF7",
            "reminderMinutesBeforeStart": 15,
            "isReminderOn": false,
            "hasAttachments": false,
            "subject": "Azure 532",
            "body": {
                "contentType": "html",
                "content": "<html>\r\n<head>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">\r\n<meta content=\"text/html; charset=us-ascii\">\r\n<meta name=\"ProgId\" content=\"Word.Document\">\r\n<meta name=\"Generator\" content=\"Microsoft Word 15\">\r\n<meta name=\"Originator\" content=\"Microsoft Word 15\">\r\n<link rel=\"File-List\" href=\"cid:filelist.xml@01D0F452.3AA54670\"><style>\r\n<!--\r\n@font-face\r\n\t{font-family:\"Cambria Math\"}\r\n@font-face\r\n\t{font-family:Calibri}\r\np.MsoNormal, li.MsoNormal, div.MsoNormal\r\n\t{margin:0in;\r\n\tmargin-bottom:.0001pt;\r\n\tfont-size:11.0pt;\r\n\tfont-family:\"Calibri\",sans-serif}\r\na:link, span.MsoHyperlink\r\n\t{color:#0563C1;\r\n\ttext-decoration:underline}\r\na:visited, span.MsoHyperlinkFollowed\r\n\t{color:#954F72;\r\n\ttext-decoration:underline}\r\nspan.EmailStyle17\r\n\t{font-family:\"Calibri\",sans-serif;\r\n\tcolor:windowtext}\r\n.MsoChpDefault\r\n\t{font-family:\"Calibri\",sans-serif}\r\n@page WordSection1\r\n\t{margin:1.0in 1.0in 1.0in 1.0in}\r\ndiv.WordSection1\r\n\t{}\r\n-->\r\n</style>\r\n</head>\r\n<body lang=\"EN-US\" link=\"#0563C1\" vlink=\"#954F72\" style=\"\">\r\n<div class=\"WordSection1\">\r\n<p class=\"MsoNormal\">&nbsp;</p>\r\n</div>\r\n</body>\r\n</html>\r\n"
            },
            "bodyPreview": "",
            "importance": "normal",
            "sensitivity": "normal",
            "start": {
                "dateTime": "2015-10-02T15:00:00.0000000",
                "timeZone": "UTC"
            },
            "end": {
                "dateTime": "2015-10-03T00:00:00.0000000",
                "timeZone": "UTC"
            },
            "location": {
                "displayName": "",
                "address": {}
            },
            "isAllDay": false,
            "isCancelled": false,
            "isOrganizer": true,
            "recurrence": null,
            "responseRequested": true,
            "seriesMasterId": null,
            "showAs": "busy",
            "type": "singleInstance",
            "attendees": [
                {
                    "status": {
                        "response": "none",
                        "time": "0001-01-01T00:00:00Z"
                    },
                    "type": "required",
                    "emailAddress": {
                        "name": "Gregory Degruy",
                        "address": "grdegr@microsoft.com"
                    }
                }
            ],
            "organizer": {
                "emailAddress": {
                    "name": "Greg Degruy",
                    "address": "Gregory.Degruy@microsoft.com"
                }
            },
            "webLink": "https://outlook.office365.com/owa/?ItemID=AAMkADc5NzQyYWI2LWMxOTctNDRmZi05ZTA3LWE3NmRmYmY1MDQ0MgBGAAAAAADXlwbV2STsRLeDUWHghS8MBwDHXzszvWCLTrbQs5TTKyesAAAAtujXAAAoP%2BtHHJf4RKg59YJl%2Bd8XAAAEs3bpAAA%3D&exvsurl=1&viewModel=ICalendarItemDetailsViewModelFactory",
            "onlineMeetingUrl": null
        },
        {
            "@odata.etag": "W/\"KD/rRxyX+ESoOfWCZfnfFwAAPP4w8g==\"",
            "id": "AAMkADc5NzQyYWI2LWMxOTctNDRmZi05ZTA3LWE3NmRmYmY1MDQ0MgBGAAAAAADXlwbV2STsRLeDUWHghS8MBwDHXzszvWCLTrbQs5TTKyesAAAAtujXAAAoP_tHHJf4RKg59YJl_d8XAAAEs3cBAAA=",
            "createdDateTime": "2015-09-28T19:17:52.276469Z",
            "lastModifiedDateTime": "2015-10-05T19:27:50.3175476Z",
            "changeKey": "KD/rRxyX+ESoOfWCZfnfFwAAPP4w8g==",
            "categories": [],
            "originalStartTimeZone": "tzone://Microsoft/Custom",
            "originalEndTimeZone": "tzone://Microsoft/Custom",
            "responseStatus": {
                "response": "none",
                "time": "0001-01-01T00:00:00Z"
            },
            "iCalUId": "040000008200E00074C5B7101A82E00800000000C00F90AFE7F9D001000000000000000010000000161F82080B826D4CBCB580B6CA119A08",
            "reminderMinutesBeforeStart": 15,
            "isReminderOn": false,
            "hasAttachments": false,
            "subject": "Azure Exam 532",
            "body": {
                "contentType": "text",
                "content": "\r\n"
            },
            "bodyPreview": "",
            "importance": "normal",
            "sensitivity": "normal",
            "start": {
                "dateTime": "2015-10-05T15:00:00.0000000",
                "timeZone": "UTC"
            },
            "end": {
                "dateTime": "2015-10-05T19:30:00.0000000",
                "timeZone": "UTC"
            },
            "location": {
                "displayName": "Testing Center"
            },
            "isAllDay": false,
            "isCancelled": false,
            "isOrganizer": true,
            "recurrence": null,
            "responseRequested": true,
            "seriesMasterId": null,
            "showAs": "busy",
            "type": "singleInstance",
            "attendees": [],
            "organizer": {
                "emailAddress": {
                    "name": "Greg Degruy",
                    "address": "Gregory.Degruy@microsoft.com"
                }
            },
            "webLink": "https://outlook.office365.com/owa/?ItemID=AAMkADc5NzQyYWI2LWMxOTctNDRmZi05ZTA3LWE3NmRmYmY1MDQ0MgBGAAAAAADXlwbV2STsRLeDUWHghS8MBwDHXzszvWCLTrbQs5TTKyesAAAAtujXAAAoP%2BtHHJf4RKg59YJl%2Bd8XAAAEs3cBAAA%3D&exvsurl=1&viewModel=ICalendarItemDetailsViewModelFactory",
            "onlineMeetingUrl": null
        }

我相信SeriesMasterId僅適用於重復事件的單次出現,您不會在/me/events看到。 以這種方式獲取事件僅返回主事件。 嘗試列出日歷視圖,這將擴展重復發生的事件。

您不需要 SeriesMasterId 來下載系列的實例。 您可以在響應中檢查重復對象並在下面的示例 API 中發送那些會議 ID (id)

獲取https://graph.microsoft.com/v1.0/me/events/{meeting_id}/instances?startDateTime=2019-04-08T09:00:00.0000000&endDateTime=2019-04-30T09:00:00.0000000&$ =主題,bodyPreview,seriesMasterId,類型,重復,開始,結束

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM