Outlook/Office365 API - Get Calendar events with Extensions












0














I am using the Office365 API for calendar events. I am able to create an event successfully with Extensions (custom data) like below...



But, when I get calendar events it does not return back any Extensions data field.



GET https://outlook.office.com/api/v2.0/me/events


How do I get the Extensions back in the events data?



POST: https://outlook.office.com/api/v2.0/me/events
authorization: bearer {token}
content-type: application/json
{
"Subject": "Discuss the Calendar REST API",
"Body": {
"ContentType": "HTML",
"Content": "I think it will meet our requirements!"
},
"Start": {
"DateTime": "2016-09-06T18:00:00",
"TimeZone": "Pacific Standard Time"
},
"End": {
"DateTime": "2016-09-06T18:00:00",
"TimeZone": "Pacific Standard Time"
},

"Extensions": [
{
"@odata.type": "Microsoft.OutlookServices.OpenTypeExtension",
"ExtensionName": "Com.Contoso.Referral",
"CompanyName": "Wingtip Toys",
"ExpirationDate": "2015-12-30T11:00:00.000Z",
"DealValue": 10000,
"TopModels": [
3001,
4002,
5003
],
"TopSalespersons": [
"Dana Swope",
"Fanny Downs",
"Randi Welch"
]
}]

}









share|improve this question



























    0














    I am using the Office365 API for calendar events. I am able to create an event successfully with Extensions (custom data) like below...



    But, when I get calendar events it does not return back any Extensions data field.



    GET https://outlook.office.com/api/v2.0/me/events


    How do I get the Extensions back in the events data?



    POST: https://outlook.office.com/api/v2.0/me/events
    authorization: bearer {token}
    content-type: application/json
    {
    "Subject": "Discuss the Calendar REST API",
    "Body": {
    "ContentType": "HTML",
    "Content": "I think it will meet our requirements!"
    },
    "Start": {
    "DateTime": "2016-09-06T18:00:00",
    "TimeZone": "Pacific Standard Time"
    },
    "End": {
    "DateTime": "2016-09-06T18:00:00",
    "TimeZone": "Pacific Standard Time"
    },

    "Extensions": [
    {
    "@odata.type": "Microsoft.OutlookServices.OpenTypeExtension",
    "ExtensionName": "Com.Contoso.Referral",
    "CompanyName": "Wingtip Toys",
    "ExpirationDate": "2015-12-30T11:00:00.000Z",
    "DealValue": 10000,
    "TopModels": [
    3001,
    4002,
    5003
    ],
    "TopSalespersons": [
    "Dana Swope",
    "Fanny Downs",
    "Randi Welch"
    ]
    }]

    }









    share|improve this question

























      0












      0








      0







      I am using the Office365 API for calendar events. I am able to create an event successfully with Extensions (custom data) like below...



      But, when I get calendar events it does not return back any Extensions data field.



      GET https://outlook.office.com/api/v2.0/me/events


      How do I get the Extensions back in the events data?



      POST: https://outlook.office.com/api/v2.0/me/events
      authorization: bearer {token}
      content-type: application/json
      {
      "Subject": "Discuss the Calendar REST API",
      "Body": {
      "ContentType": "HTML",
      "Content": "I think it will meet our requirements!"
      },
      "Start": {
      "DateTime": "2016-09-06T18:00:00",
      "TimeZone": "Pacific Standard Time"
      },
      "End": {
      "DateTime": "2016-09-06T18:00:00",
      "TimeZone": "Pacific Standard Time"
      },

      "Extensions": [
      {
      "@odata.type": "Microsoft.OutlookServices.OpenTypeExtension",
      "ExtensionName": "Com.Contoso.Referral",
      "CompanyName": "Wingtip Toys",
      "ExpirationDate": "2015-12-30T11:00:00.000Z",
      "DealValue": 10000,
      "TopModels": [
      3001,
      4002,
      5003
      ],
      "TopSalespersons": [
      "Dana Swope",
      "Fanny Downs",
      "Randi Welch"
      ]
      }]

      }









      share|improve this question













      I am using the Office365 API for calendar events. I am able to create an event successfully with Extensions (custom data) like below...



      But, when I get calendar events it does not return back any Extensions data field.



      GET https://outlook.office.com/api/v2.0/me/events


      How do I get the Extensions back in the events data?



      POST: https://outlook.office.com/api/v2.0/me/events
      authorization: bearer {token}
      content-type: application/json
      {
      "Subject": "Discuss the Calendar REST API",
      "Body": {
      "ContentType": "HTML",
      "Content": "I think it will meet our requirements!"
      },
      "Start": {
      "DateTime": "2016-09-06T18:00:00",
      "TimeZone": "Pacific Standard Time"
      },
      "End": {
      "DateTime": "2016-09-06T18:00:00",
      "TimeZone": "Pacific Standard Time"
      },

      "Extensions": [
      {
      "@odata.type": "Microsoft.OutlookServices.OpenTypeExtension",
      "ExtensionName": "Com.Contoso.Referral",
      "CompanyName": "Wingtip Toys",
      "ExpirationDate": "2015-12-30T11:00:00.000Z",
      "DealValue": 10000,
      "TopModels": [
      3001,
      4002,
      5003
      ],
      "TopSalespersons": [
      "Dana Swope",
      "Fanny Downs",
      "Randi Welch"
      ]
      }]

      }






      outlook office365






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 20 at 2:52









      hello mtyj

      5401718




      5401718
























          1 Answer
          1






          active

          oldest

          votes


















          0














          You could get extension using the below api:



          GET https://outlook.office.com/api/v2.0/me/events('{event_id}')/extensions('{extensionId}')



          For example:



          GET https://outlook.office.com/api/v2.0/me/messages('AAMkAGE1M2IyNGNmLTI5MTktNDUyZi1iOTVl===')/extensions('Com.Contoso.Referral')



          For more information, please refer to the below link:



          Get extension






          share|improve this answer





















          • But if I have 100 calendar events, I have to query this GET API 100 times to get each event's Extension. That's not good. How can I include Extension with getEvents query?
            – hello mtyj
            Nov 20 at 7:59










          • No, you could not use getEvents query to get Extensions
            – Alina Li
            Nov 20 at 8:40











          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53385529%2foutlook-office365-api-get-calendar-events-with-extensions%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0














          You could get extension using the below api:



          GET https://outlook.office.com/api/v2.0/me/events('{event_id}')/extensions('{extensionId}')



          For example:



          GET https://outlook.office.com/api/v2.0/me/messages('AAMkAGE1M2IyNGNmLTI5MTktNDUyZi1iOTVl===')/extensions('Com.Contoso.Referral')



          For more information, please refer to the below link:



          Get extension






          share|improve this answer





















          • But if I have 100 calendar events, I have to query this GET API 100 times to get each event's Extension. That's not good. How can I include Extension with getEvents query?
            – hello mtyj
            Nov 20 at 7:59










          • No, you could not use getEvents query to get Extensions
            – Alina Li
            Nov 20 at 8:40
















          0














          You could get extension using the below api:



          GET https://outlook.office.com/api/v2.0/me/events('{event_id}')/extensions('{extensionId}')



          For example:



          GET https://outlook.office.com/api/v2.0/me/messages('AAMkAGE1M2IyNGNmLTI5MTktNDUyZi1iOTVl===')/extensions('Com.Contoso.Referral')



          For more information, please refer to the below link:



          Get extension






          share|improve this answer





















          • But if I have 100 calendar events, I have to query this GET API 100 times to get each event's Extension. That's not good. How can I include Extension with getEvents query?
            – hello mtyj
            Nov 20 at 7:59










          • No, you could not use getEvents query to get Extensions
            – Alina Li
            Nov 20 at 8:40














          0












          0








          0






          You could get extension using the below api:



          GET https://outlook.office.com/api/v2.0/me/events('{event_id}')/extensions('{extensionId}')



          For example:



          GET https://outlook.office.com/api/v2.0/me/messages('AAMkAGE1M2IyNGNmLTI5MTktNDUyZi1iOTVl===')/extensions('Com.Contoso.Referral')



          For more information, please refer to the below link:



          Get extension






          share|improve this answer












          You could get extension using the below api:



          GET https://outlook.office.com/api/v2.0/me/events('{event_id}')/extensions('{extensionId}')



          For example:



          GET https://outlook.office.com/api/v2.0/me/messages('AAMkAGE1M2IyNGNmLTI5MTktNDUyZi1iOTVl===')/extensions('Com.Contoso.Referral')



          For more information, please refer to the below link:



          Get extension







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 20 at 5:28









          Alina Li

          566125




          566125












          • But if I have 100 calendar events, I have to query this GET API 100 times to get each event's Extension. That's not good. How can I include Extension with getEvents query?
            – hello mtyj
            Nov 20 at 7:59










          • No, you could not use getEvents query to get Extensions
            – Alina Li
            Nov 20 at 8:40


















          • But if I have 100 calendar events, I have to query this GET API 100 times to get each event's Extension. That's not good. How can I include Extension with getEvents query?
            – hello mtyj
            Nov 20 at 7:59










          • No, you could not use getEvents query to get Extensions
            – Alina Li
            Nov 20 at 8:40
















          But if I have 100 calendar events, I have to query this GET API 100 times to get each event's Extension. That's not good. How can I include Extension with getEvents query?
          – hello mtyj
          Nov 20 at 7:59




          But if I have 100 calendar events, I have to query this GET API 100 times to get each event's Extension. That's not good. How can I include Extension with getEvents query?
          – hello mtyj
          Nov 20 at 7:59












          No, you could not use getEvents query to get Extensions
          – Alina Li
          Nov 20 at 8:40




          No, you could not use getEvents query to get Extensions
          – Alina Li
          Nov 20 at 8:40


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.





          Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


          Please pay close attention to the following guidance:


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53385529%2foutlook-office365-api-get-calendar-events-with-extensions%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          "Incorrect syntax near the keyword 'ON'. (on update cascade, on delete cascade,)

          Alcedinidae

          Origin of the phrase “under your belt”?