Skill Level:
Advanced
This API endpoint allows you to read from all calendars.
Available Methods
Read
GET
http://events.unl.edu/api/v2/all-calendars/search/
This endpoint is for searching all calendars. Personal calendars that share a shortname with your UID will not be shown except for specifically requesting the personal calendar.
HTTP Method
GET
Authentication Requirements
None
Request Data
-
q
string Required queryThe search query for finding specific calendars. Type in a UID to find their personal calendar.
Response Data
-
Status
numberStatus code for the request. -
Message
stringStatus message for the request. -
Data
Array of Calendar Objects | nullThe requested calendars data or null on error.-
id
stringThe ID of the calendar. -
name
stringThe name of the calendar. -
short-name
stringThe short name of the calendar. This can be used in the URL of other events API v2 requests. -
default-timezone
stringThe default timezone of the calendar. This can be overridden by event's data times. -
webpage
string | nullThe webpage of the calendar or null if none is set. -
email-list
string | nullThe list of emails for the calendar or null if none is set. Emails will be separated by commas. -
event-release-preference
stringThe release process for events after they are created on the calendar. -
recommendations-within-account
boolWhether users on the same account can recommend events to this calendar.
-
Example Code
Javascript
async function eventsAPI() { const response = await fetch('https://events.unl.edu/api/v2/all-calendars/search/?q=wdn'); if (response.ok) { const response_json = await response.json(); console.log(response_json.data); } }
CURL
curl -X GET 'https://events.unl.edu/api/v2/all-calendars/search/?q=wdn'
PHP
function eventsAPI() { $url = 'https://events.unl.edu/api/v2/all-calendars/search/?q=wdn'; // Make an HTTP GET request using file_get_contents $response = file_get_contents($url); if ($response !== false) { // Decode the JSON response $responseData = json_decode($response, true); // Check if JSON decoding was successful if ($responseData !== null) { // Access the 'data' field in the response JSON var_dump($responseData); } else { echo 'JSON decoding error'; } } else { echo 'Error fetching data'; } }
Read (Search Events)
GET
http://events.unl.edu/api/v2/all-calendars/events/search/
This endpoint is for searching all calendar's events. This will only display events marked public.
HTTP Method
GET
Authentication Requirements
None
Request Data
-
q
string Required queryThe search query for finding events from all calendars. -
limit
number queryThis is the number of events you want to receive. Max limit is 500 and default is 100. -
offset
number queryThis offset is to be used to get the next batch of events beyond the initial limit. -
audience
string queryFilters searched events based on their audiences. This will be the name of the audiences and to add multiple they will ne comma separated. -
type
string queryFilters searched events based on their event type. This will be the name of the event types and to add multiple they will ne comma separated.
Response Data
-
Status
numberStatus code for the request. -
Message
stringStatus message for the request. -
Data
Array of Event Objects | nullThe list of the events from any calendar.-
id
stringThe ID of the event. -
title
string | nullThe title of the event or null if none is set. -
subtitle
string | nullThe subtitle of the event or null if none is set. -
description
string | nullThe description of the event or null if none is set. -
webpage
string | nullThe webpage of the event or null if none is set. This will always be a URL. -
private-public
'private' | 'public' | nullThe status of the event's publicity or null if none is set. This will always be public or private. -
listing-contact-name
string | nullThe event's listed contact's name or null if none is set. -
listing-contact-phone
string | nullThe event's listed contact's phone number or null if none is set. -
listing-contact-email
string | nullThe event's listed contact's email or null if none is set. -
listing-contact-url
string | nullThe event's listed contact's url or null if none is set. This will always be a URL. -
listing-contact-type
'person' | 'organization' | nullThe type of the event's listed contact or null if none is set. This will always be a person or organization. -
canceled
boolIf the event has been canceled. -
original-calendar
Calendar ObjectThe original calendar the event was posted on.-
id
stringThe ID of the calendar. -
name
stringThe name of the calendar. -
short-name
stringThe short name of the calendar. This can be used in the URL of other events API v2 requests. -
default-timezone
stringThe default timezone of the calendar. This can be overridden by event's data times. -
webpage
string | nullThe webpage of the calendar or null if none is set. -
email-list
string | nullThe list of emails for the calendar or null if none is set. Emails will be separated by commas. -
event-release-preference
stringThe release process for events after they are created on the calendar. -
recommendations-within-account
boolWhether users on the same account can recommend events to this calendar.
-
-
eventtypes
Array of Event Type ObjectsA list of all the event types this event has attached to it. This list will only have one item in it.-
ID
StringID of the event type record. -
Name
StringName of the event type record.
-
-
audiences
Array of Audience ObjectsA list of all the audiences this event has attached to it.-
ID
StringID of the audience record. -
Name
StringName of the audience record.
-
-
image-url
string | nullThe URL of the image of the event or null if none are set. This will always be a URL. -
occurrences
Array of Event Occurrence ObjectsA list of all the occurrences of the event.-
id
stringThe ID of the occurrence date time. This ID can be used to look up events. -
start-time
stringThe start time of the occurrence date time. This is in the ISO 8601 format. -
end-time
string | nullThe end time of the occurrence date time or null if none is set. This is in the ISO 8601 format. -
is-all-day
boolWhether the event occurrence is all day or at a specific time. -
event-timezone
stringThe timezone of the event occurrence. This will override the calendar's default timezone. -
is-recurring
boolWhether the event occurrence has recurrences or not. -
canceled
boolWhether the event occurrence has been canceled or not. -
event-additional-public-info
string | nullThe additional info for the event occurrence or null if none is set. -
event-room
string | nullThe room the event occurrence will take place or null if none is set. This will override the location's room. -
event-directions
string | nullThe directions for the event occurrence or null if none is set. This will override the location's directions. -
event-location-additional-public-info
string | nullThe additional info for the event occurrence's location or null if none is set. This will override the location's additional public info. -
event-virtual-additional-public-info
string | nullThe additional info for the event occurrence's virtual location or null if none is set. This will override the virtual location's additional public info. -
location
Location Object | nullThe location of the event occurrence or null if none is set.-
id
stringThe ID of the location. -
name
string | nullThe name of the location or null if none is set. -
address-1
string | nullThe street address of the location or null if none is set. -
address-2
string | nullThe additional address of the location or null if none is set. -
city
string | nullThe city of the location or null if none is set. -
state
string | nullThe state of the location or null if none is set. This will always be the 2 letter abbreviation of the state. -
zip
string | nullThe zip of the location or null if none is set. This will always be ≤ 10 characters long. -
map-url
string | nullThe url of the map graphical interface of the location or null if none is set. This will always be a URL. -
webpage
string | nullThe web page of the location or null if none is set. This will always be a URL. -
hours
string | nullThe hours of the location or null if none is set. -
phone
string | nullThe phone number of the location or null if none is set. -
default-room
string | nullThe room of the location or null if none is set. This will be overridden on events.unl.edu if the event has a room set. -
default-directions
string | nullThe directions of the location or null if none is set. This will be overridden on events.unl.edu if the event has a directions set. -
default-additional-public-info
string | nullThe additional public info of the location or null if none is set. This will be overridden on events.unl.edu if the event has specific location additional public info set. -
user-id
string | nullThe user UID that the location is saved to or null if none is set. -
calendar-id
string | nullThe calendar ID that the location is saved to or null if none is set.
-
-
virtual-location
Virtual Location Object | nullThe virtual location of the event occurrence or null if none is set.-
id
stringThe ID of the virtual location. -
name
stringThe name of the virtual location. -
url
stringThe url of the virtual location. -
default-additional-public-info
string | nullThe additional public info of the virtual location or null if none is set. This will be overridden on events.unl.edu if the event has specific virtual location additional public info set. -
user-id
string | nullThe user UID that the virtual location is saved to or null if none is set. -
calendar-id
string | nullThe calendar ID that the virtual location is saved to or null if none is set.
-
-
recurring-dates
Array of Recurrence ObjectsA list of the event occurrence recurrences.-
id
stringThe ID of the recurrence record. This ID can be used to look up events. -
recurring-date
stringThe date of the recurrence. This is in YYYY-MM-DD format. -
recurrence-id
stringThe ID of the recurrence relative to the occurrence. -
ongoing
boolWhether the recurrence is ongoing. -
canceled
boolWhether this recurrence is canceled or not.
-
-
-
Example Code
Javascript
async function eventsAPI() { const response = await fetch('https://events.unl.edu/api/v2/all-calendars/events/search/?q=wdn'); if (response.ok) { const response_json = await response.json(); console.log(response_json.data); } }
CURL
curl -X GET 'https://events.unl.edu/api/v2/all-calendars/events/search/?q=wdn'
PHP
function eventsAPI() { $url = 'https://events.unl.edu/api/v2/all-calendars/events/search/?q=wdn'; // Make an HTTP GET request using file_get_contents $response = file_get_contents($url); if ($response !== false) { // Decode the JSON response $responseData = json_decode($response, true); // Check if JSON decoding was successful if ($responseData !== null) { // Access the 'data' field in the response JSON var_dump($responseData); } else { echo 'JSON decoding error'; } } else { echo 'Error fetching data'; } }
Contributed By:
DXG
- Printer-friendly version
- Log in to post comments