Introduction

The calendar API is a service that provides calendar items and calendar categories for local consumption. The lists of events returned contain both events displayed on the BYU calendar and events that are not displayed on the BYU calendar. This document provides reference material on all available parameters and routes. All of the events returned have been reviewed and approved by the appropriate administrators according to BYU policies.

Audience

This documentation is intended for BYU developers who wish to retrieve events and categories from the centralized calendar database. If a BYU department or organization would like to use this calendar as a centralized database for their own calendar events please contact us. If this document appears unclear or if any problems arise also contact us.

Contact Us

Response Types

The BYU calendar web service allows events to be downloaded as XML, JSON, or JSONP. In order to request XML or JSON use the "Accept" HTTP Header and specify JSON or XML.

  example:

       Accept: application/xml

       http://calendar.byu.edu/api/Events?

< ArrayOfPublicEventViewModel>
    < PublicEventViewModel>
< AllDay >false< /AllDay>
< CategoryId >25< /CategoryId>
< CategoryName >Basketball (W)< /CategoryName>
< Description i:nil="true"/>
< EndDateTime i:nil="true"/>
< EventId>11229< /EventId>
< HighPrice>20< /HighPrice>
< ImgAlt>Haley Steed moves the ball up the court< /ImgAlt>
< ImgUrl>/Content/uploads/images/w-basketball.jpg< /ImgUrl>
< IsFeatured>true< /IsFeatured>
< IsPublishedNotMainCalendar>true< /IsPublishedNotMainCalendar>
< Latitude>40.25409< /Latitude>
< LocationName>Marriott Center, East University Parkway, Provo, UT< /LocationName>
< Longitude>-111.64934299999999< /Longitude>
< LowPrice>5< /LowPrice>
< MoreInformationUrl>http://byucougars.com/home/w-basketball< /MoreInformationUrl>
< OccurrenceId>17851< /OccurrenceId>
< PriceDescription>byutickets.com< /PriceDescription>
< ShortUrl>Womens-Basketball-vs-UC-Santa-Barbara< /ShortUrl>
< StartDateTime>2012-12-18T14:00:00< /StartDateTime>
< Title>Women's Basketball vs. UC Santa Barbara< /Title>

   < / PublicEventViewModel >
< /ArrayOfPublicEventViewModel>

       Accept: application/json

       http://calendar.byu.edu/api/Events?

   {
"EventId":11229,
"ShortUrl":"Womens-Basketball-vs-UC-Santa-Barbara",
"Title":"Women's Basketball vs. UC Santa Barbara",
"Description":null,
"IsFeatured":true,
"LowPrice":5.0,
"HighPrice":20.0,
"PriceDescription":"byutickets.com",
"LocationName":"Marriott Center, East University Parkway, Provo, UT",
"Latitude":40.25409,"Longitude":-111.64934299999999,
"ImgUrl":"/Content/uploads/images/w-basketball.jpg",
"ImgAlt":"Haley Steed moves the ball up the court",
"StartDateTime":"2012-12-18T14:00:00",
"EndDateTime":null,"AllDay":false,
"MoreInformationUrl":"http://byucougars.com/home/w-basketball",
"IsPublishedNotMainCalendar":true,
"OccurrenceId":17851,
"CategoryId":25,
"CategoryName":"Basketball (W)"

   }

More information on HTTP Headers

In order to download events in JSONP set the appropriate "Accept" header to JSON and then add the querystring parameter "callback" to define the callback.

 example:

       Accept: application/json

       http://calendar.byu.edu/api/Events?callback=jsonp

jsonp(
  [
   {
"EventId":11229,
"ShortUrl":"Womens-Basketball-vs-UC-Santa-Barbara",
"Title":"Women's Basketball vs. UC Santa Barbara",
"Description":null,
"IsFeatured":true,
"LowPrice":5.0,
"HighPrice":20.0,
"PriceDescription":"byutickets.com",
"LocationName":"Marriott Center, East University Parkway, Provo, UT",
"Latitude":40.25409,"Longitude":-111.64934299999999,
"ImgUrl":"/Content/uploads/images/w-basketball.jpg",
"ImgAlt":"Haley Steed moves the ball up the court",
"StartDateTime":"2012-12-18T14:00:00",
"EndDateTime":null,"AllDay":false,
"MoreInformationUrl":"http://byucougars.com/home/w-basketball",
"IsPublishedNotMainCalendar":true,
"OccurrenceId":17851,
"CategoryId":25,
"CategoryName":"Basketball (W)"

   }
   ,...
   }
  ]
)