This API endpoint allows access for specific calendar events.
Available Endpoints
Read (By ID)
GET
http://events.unl.edu/api/v2/calendar/{calendar_id}/event/{event_id}/
This endpoint is for getting a specific calendar event based on its ID.
HTTP Method
GET
Authentication Requirements
None
Request Data
-
calendar_id
string | number Required PathID or shortname of the calendar the event will be in. This will go into the path of the request. -
event_id
number Required PathID the event to be looked up. This will go into the path of the request.
Response Data
-
Status
numberStatus code for the request. -
Message
stringStatus message for the request. -
Data
Event Object | nullThe requested event data or null on error.-
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. -
calendar-event-status
stringThe event status of that event on that calendar. -
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
async function eventsAPI() { const response = await fetch('https://events.unl.edu/api/v2/calendar/3809/event/118830/'); // const response = await fetch('https://events.unl.edu/api/v2/calendar/wdn_monthly/event/118830/'); if (response.ok) { const response_json = await response.json(); console.log(response_json.data); } }
curl -X GET 'https://events.unl.edu/api/v2/calendar/3809/event/118830/'
function eventsAPI() { $url = 'https://events.unl.edu/api/v2/calendar/3809/event/118830/'; // $url = 'https://events.unl.edu/api/v2/calendar/wdn_monthly/event/118830/'; // 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 (Datetime ID)
GET
http://events.unl.edu/api/v2/calendar/{calendar_id}/event/datetime/{datetime_id}/
This endpoint is for getting a specific calendar event based on its datetime ID.
HTTP Method
GET
Authentication Requirements
None
Request Data
-
calendar_id
string | number Required PathID or shortname of the calendar the event will be in. This will go into the path of the request. -
datetime_id
number Required PathOne of the event's occurrences datetime ID that the event will be looked up from. This will go into the path of the request.
Response Data
-
Status
numberStatus code for the request. -
Message
stringStatus message for the request. -
Data
Event Object | nullThe requested event data or null on error.-
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. -
calendar-event-status
stringThe event status of that event on that calendar. -
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
async function eventsAPI() { const response = await fetch('https://events.unl.edu/api/v2/calendar/3809/event/datetime/136744/'); // const response = await fetch('https://events.unl.edu/api/v2/calendar/wdn_monthly/event/datetime/136744/'); if (response.ok) { const response_json = await response.json(); console.log(response_json.data); } }
curl -X GET 'https://events.unl.edu/api/v2/calendar/3809/event/datetime/136744/'
function eventsAPI() { $url = 'https://events.unl.edu/api/v2/calendar/3809/event/datetime/136744/'; // $url = 'https://events.unl.edu/api/v2/calendar/wdn_monthly/event/datetime/136744/'; // 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 (Recurrence ID)
GET
http://events.unl.edu/api/v2/calendar/{calendar_id}/event/datetime/recurrence/{recurrence_id}/
This endpoint is for getting a specific calendar event based on its recurring occurrence's ID.
HTTP Method
GET
Authentication Requirements
None
Request Data
-
calendar_id
string | number Required PathID or shortname of the calendar the event will be in. This will go into the path of the request. -
recurrence_id
number Required PathAn event's recurring datetime's recurrence ID that the event will be looked up from. This will go into the path of the request.
Response Data
-
Status
numberStatus code for the request. -
Message
stringStatus message for the request. -
Data
Event Object | nullThe requested event data or null on error.-
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. -
calendar-event-status
stringThe event status of that event on that calendar. -
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
async function eventsAPI() { const response = await fetch('https://events.unl.edu/api/v2/location/standard/'); if (response.ok) { const response_json = await response.json(); console.log(response_json.data); } }
curl -X GET 'https://events.unl.edu/api/v2/location/standard/'
function eventsAPI() { $url = 'https://events.unl.edu/api/v2/location/standard/'; // 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'; } }
Create
POST
http://events.unl.edu/api/v2/calendar/{calendar_id}/event/
This endpoint is for creating a new calendar event.
HTTP Method
POST
Authentication Requirements
You must add a header to the request with the header key being Authentication
and the value being your API Token.
Request Data
-
calendar_id
string | number Required PathID or shortname of the calendar the event will be in. This will go into the path of the request. -
title
string RequiredThe title of the event. -
subtitle
string | nullThe subtitle of the event. -
description
string | nullThe description of the event. -
webpage
string | nullThe webpage of the event. This will have to be a valid URL. -
eventtype
string RequiredThe ID of the event type to be linked to this event. -
audience-{audience_id}
boolSince there can be multiple audiences per event this parameter you will need to add the ID of the audience and then set the value to true or false whether the event would target that audience or not. e.g.'audience-5': true,
Audiences omitted will be defaulted to false. -
canceled
boolWhether the event has been canceled. -
event-timezone
string RequiredThe timezone for the event occurrence. The options for this are Eastern, Central, Mountain, Arizona, and Pacific. -
start-date
string RequiredThe date the event will occur. This will be in mm/dd/yyy format. -
start-time-hour
string | nullThe hour portion of the event start time. This number will be in the range of 1-12. This will default to 12. -
start-time-minute
string | nullThe minute portion of the event start time. This number will be in the range of 0-59. This will default to 0. -
start-time-am-pm
string | nullThe minute portion of the event start time. This number will be 'am' or 'pm'. This will default to 'am'. -
end-date
string | nullThe end date of the event. -
end-time-hour
string | nullThe hour portion of the event end time. This number will be in the range of 1-12. This will default to 12. -
end-time-minute
string | nullThe minute portion of the event end time. This number will be in the range of 0-59. This will default to 0. -
end-time-am-pm
string | nullThe minute portion of the event end time. This number will be 'am' or 'pm'. This will default to 'am'. -
recurring-type
string | nullIf this event will be recurring the type of recurrence. The options are daily, weekly, annually, date (same day of each month), last (last of that day of the week of the month), first (first of that day of the week of the month), second (second of that day of the week of the month), third (third of that day of the week of the month), fourth (fourth of that day of the week of the month), and lastday (last day of the month). -
recurs-until-date
string | nullThe date that the event will recur until. If the recurring type is set then this will need to be set. -
event-additional-public-info
string | nullAny additional info for the event occurrence. -
location
string | nullThe ID of the location of the event. -
event-room
string | nullThe room for this specific event occurrence. -
event-directions
string | nullThe directions for this specific event occurrence. -
event-location-additional-public-info
string | nullAny additional info for this location for this specific event occurrence. -
virtual-location
string | nullThe ID of the virtual location of the event. -
event-virtual-location-additional-public-info
string | nullAny additional info for this virtual location for this specific event occurrence. -
private-public
string | nullWhether the event should be private or public. The options for this should be private or public. -
listing-contact-type
string | nullThe type of the listing contact. The options for this should be person or organization. -
listing-contact-name
string | nullThe name of the listing contact. -
listing-contact-phone
string | nullThe phone of the listing contact. -
listing-contact-email
string | nullThe email of the listing contact. -
listing-contact-website
string | nullThe website of the listing contact. This should be a valid URL.
Response Data
-
Status
numberStatus code for the request. -
Message
stringStatus message for the request. -
Data
Event Object | nullThe newly created event data or null on error.-
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. -
calendar-event-status
stringThe event status of that event on that calendar. -
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
async function eventsAPI() { // Sets up data const data = { 'title': 'API Event Documentation', 'subtitle': 'Subtitle for the event', 'description': 'Testing out the API for making an event', 'webpage': 'https://www.unl.edu/', 'eventtype': '65', 'audience-1': true, 'audience-2': true, 'canceled': false, 'event-timezone': 'central', 'start-date': '07/28/2023', 'start-time-hour': '05', 'start-time-minute': '30', 'start-time-am-pm': 'pm', 'end-date': '07/28/2023', 'end-time-hour': '06', 'end-time-minute': '35', 'end-time-am-pm': 'pm', 'recurring-type': 'date', 'recurs-until-date': '07/28/2024', 'event-additional-public-info': 'This is an API generated event', 'location': '27161', 'event-room': 'Meeting room 1', 'event-directions': 'Go up the stairs and take a left.', 'event-location-additional-public-info': 'It will be above the goodly cookies.', 'virtual-location': '1234', 'event-virtual-location-additional-public-info': 'password is cookies.', 'private-public': 'public', 'listing-contact-type': 'person', 'listing-contact-name': 'herbie', 'listing-contact-phone': '402-867-5309', 'listing-contact-email': 'hhusker2@unl.edu', 'listing-contact-website': 'https://www.unl.edu/', } // Sends request with method, headers, and data const response = await fetch( 'https://events.unl.edu/api/v2/calendar/3809/event/', { method: 'POST', headers: { 'content-type': 'application/json', 'Authentication': MY_API_TOKEN, }, body: JSON.stringify(data), } ); // Checks response and throws error on error if (response.ok) { const response_json = await response.json(); console.log(response_json.data); } else { response.text().then(text => {throw new Error(text)}) } }
curl -X POST https://events.unl.edu/api/v2/calendar/3809/event/ \ -H "Content-Type: application/json" \ -H "Authentication: MY_API_TOKEN" \ -d '{ "title": "API Event Documentation", "subtitle": "Subtitle for the event", "description": "Testing out the API for making an event", "webpage": "https://www.unl.edu/", "eventtype": "65", "audience-1": true, "audience-2": true, "canceled": false, "event-timezone": "central", "start-date": "07/28/2023", "start-time-hour": "05", "start-time-minute": "30", "start-time-am-pm": "pm", "end-date": "07/28/2023", "end-time-hour": "06", "end-time-minute": "35", "end-time-am-pm": "pm", "recurring-type": "date", "recurs-until-date": "07/28/2024", "event-additional-public-info": "This is an API generated event", "location": "27161", "event-room": "Meeting room 1", "event-directions": "Go up the stairs and take a left.", "event-location-additional-public-info": "It will be above the goodly cookies.", "virtual-location": "1234", "event-virtual-location-additional-public-info": "password is cookies.", "private-public": "public", "listing-contact-type": "person", "listing-contact-name": "herbie", "listing-contact-phone": "402-867-5309", "listing-contact-email": "hhusker2@unl.edu", "listing-contact-website": "https://www.unl.edu/", }'
function eventsAPI() { $data = array( 'title' => 'API Event Documentation', 'subtitle' => 'Subtitle for the event', 'description' => 'Testing out the API for making an event', 'webpage' => 'https://www.unl.edu/', 'eventtype' => '65', 'audience-1' => true, 'audience-2' => true, 'canceled' => false, 'event-timezone' => 'central', 'start-date' => '07/28/2023', 'start-time-hour' => '05', 'start-time-minute' => '30', 'start-time-am-pm' => 'pm', 'end-date' => '07/28/2023', 'end-time-hour' => '06', 'end-time-minute' => '35', 'end-time-am-pm' => 'pm', 'recurring-type' => 'date', 'recurs-until-date' => '07/28/2024', 'event-additional-public-info' => 'This is an API generated event', 'location' => '27161', 'event-room' => 'Meeting room 1', 'event-directions' => 'Go up the stairs and take a left.', 'event-location-additional-public-info' => 'It will be above the goodly cookies.', 'virtual-location' => '1234', 'event-virtual-location-additional-public-info' => 'password is cookies.', 'private-public' => 'public', 'listing-contact-type' => 'person', 'listing-contact-name' => 'herbie', 'listing-contact-phone' => '402-867-5309', 'listing-contact-email' => 'hhusker2@unl.edu', 'listing-contact-website' => 'https://www.unl.edu/', ); $jsonData = json_encode($data); $apiToken = 'MY_API_TOKEN'; $url = 'https://events.unl.edu/api/v2/calendar/3809/event/'; $headers = array( 'Content-Type: application/json', 'Authentication: ' . $apiToken, ); // Initialize cURL session $ch = curl_init(); // Set cURL options curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $jsonData); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); // Execute cURL session and get the response $response = curl_exec($ch); // Check if cURL request was successful if ($response === false) { // Handle cURL error echo 'cURL Error: ' . curl_error($ch); } else { $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); if ($httpCode === 200) { // Successful response $responseData = json_decode($response, true); var_dump($responseData); } else { // Error response echo 'API Error: ' . $response; } } // Close cURL session curl_close($ch); }
Update
PUT
http://events.unl.edu/api/v2/calendar/{calendar_id}/event/{event_id}/
This endpoint is for updating a specific calendar event based on its ID.
HTTP Method
PUT
Authentication Requirements
You must add a header to the request with the header key being Authentication
and the value being your API Token.
Request Data
Even if the data hasn't changed, please re-enter any previously existing data to avoid unintentional null values.
Due to the nature of the event occurrences editing an event will not allow you to update the event occurrences.
-
calendar_id
string | number Required PathID or shortname of the calendar the event will be in. This will go into the path of the request. -
event_id
number Required PathID the event to be looked up. This will go into the path of the request. -
calendar_id
string | number Required PathID or shortname of the calendar the event will be in. This will go into the path of the request. -
title
string RequiredThe title of the event. -
subtitle
string | nullThe subtitle of the event. -
description
string | nullThe description of the event. -
webpage
string | nullThe webpage of the event. This will have to be a valid URL. -
eventtype
string RequiredThe ID of the event type to be linked to this event. -
audience-{audience_id}
boolSince there can be multiple audiences per event this parameter you will need to add the ID of the audience and then set the value to true or false whether the event would target that audience or not. e.g.'audience-5': true,
Audiences omitted will be defaulted to false. -
canceled
boolWhether the event has been canceled. -
private-public
string | nullWhether the event should be private or public. The options for this should be private or public. -
listing-contact-type
string | nullThe type of the listing contact. The options for this should be person or organization. -
listing-contact-name
string | nullThe name of the listing contact. -
listing-contact-phone
string | nullThe phone of the listing contact. -
listing-contact-email
string | nullThe email of the listing contact. -
listing-contact-website
string | nullThe website of the listing contact. This should be a valid URL.
Response Data
-
Status
numberStatus code for the request. -
Message
stringStatus message for the request. -
Data
Event Object | nullThe newly updated event data or null on error.-
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. -
calendar-event-status
stringThe event status of that event on that calendar. -
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
async function eventsAPI() { // Sets up data const data = { 'title': 'API Event Documentation', 'subtitle': 'Subtitle for the event', 'description': 'Testing out the API for making an event', 'webpage': 'https://www.unl.edu/', 'eventtype': '65', 'audience-1': true, 'audience-2': true, 'canceled': false, 'private-public': 'public', 'listing-contact-type': 'person', 'listing-contact-name': 'herbie', 'listing-contact-phone': '402-867-5309', 'listing-contact-email': 'hhusker2@unl.edu', 'listing-contact-website': 'https://www.unl.edu/', } // Sends request with method, headers, and data const response = await fetch( 'https://events.unl.edu/api/v2/calendar/3809/event/12345/', { method: 'PUT', headers: { 'content-type': 'application/json', 'Authentication': MY_API_TOKEN, }, body: JSON.stringify(data), } ); // Checks response and throws error on error if (response.ok) { const response_json = await response.json(); console.log(response_json.data); } else { response.text().then(text => {throw new Error(text)}) } }
curl -X PUT https://events.unl.edu/api/v2/calendar/3809/event/12345/ \ -H "Content-Type: application/json" \ -H "Authentication: MY_API_TOKEN" \ -d '{ "title": "API Event Documentation", "subtitle": "Subtitle for the event", "description": "Testing out the API for making an event", "webpage": "https://www.unl.edu/", "eventtype": "65", "audience-1": true, "audience-2": true, "canceled": false, "private-public": "public", "listing-contact-type": "person", "listing-contact-name": "herbie", "listing-contact-phone": "402-867-5309", "listing-contact-email": "hhusker2@unl.edu", "listing-contact-website": "https://www.unl.edu/", }'
function eventsAPI() { $data = array( 'title' => 'API Event Documentation', 'subtitle' => 'Subtitle for the event', 'description' => 'Testing out the API for making an event', 'webpage' => 'https://www.unl.edu/', 'eventtype' => '65', 'audience-1' => true, 'audience-2' => true, 'canceled' => false, 'private-public' => 'public', 'listing-contact-type' => 'person', 'listing-contact-name' => 'herbie', 'listing-contact-phone' => '402-867-5309', 'listing-contact-email' => 'hhusker2@unl.edu', 'listing-contact-website' => 'https://www.unl.edu/', ); $jsonData = json_encode($data); $apiToken = 'MY_API_TOKEN'; $url = 'https://events.unl.edu/api/v2/calendar/3809/event/'; $headers = array( 'Content-Type: application/json', 'Authentication: ' . $apiToken, ); // Initialize cURL session $ch = curl_init(); // Set cURL options curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PUT'); curl_setopt($ch, CURLOPT_POSTFIELDS, $jsonData); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); // Execute cURL session and get the response $response = curl_exec($ch); // Check if cURL request was successful if ($response === false) { // Handle cURL error echo 'cURL Error: ' . curl_error($ch); } else { $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); if ($httpCode === 200) { // Successful response $responseData = json_decode($response, true); var_dump($responseData); } else { // Error response echo 'API Error: ' . $response; } } // Close cURL session curl_close($ch); }
Update (Status)
PUT
http://events.unl.edu/api/v2/calendar/{calendar_id}/event/{event_id}/status/
This endpoint is for updating a specific calendar event's status.
HTTP Method
PUT
Authentication Requirements
You must add a header to the request with the header key being Authentication
and the value being your API Token.
Request Data
Even if the data hasn't changed, please re-enter any previously existing data to avoid unintentional null values.
Due to the nature of the event occurrences editing an event will not allow you to update the event occurrences.
-
calendar_id
string | number Required PathID or shortname of the calendar the event will be in. This will go into the path of the request. -
event_id
number Required PathID the event to be looked up. This will go into the path of the request. -
status
string RequiredThe status of the event on that calendar. Available status are pending, posted, archived.
Response Data
-
Status
numberStatus code for the request. -
Message
stringStatus message for the request. -
Data
Event Object | nullThe newly updated event data or null on error.-
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. -
calendar-event-status
stringThe event status of that event on that calendar. -
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
async function eventsAPI() { // Sets up data const data = { 'status': 'pending' } // Sends request with method, headers, and data const response = await fetch( 'https://events.unl.edu/api/v2/calendar/3809/event/12345/status/', { method: 'PUT', headers: { 'content-type': 'application/json', 'Authentication': MY_API_TOKEN, }, body: JSON.stringify(data), } ); // Checks response and throws error on error if (response.ok) { const response_json = await response.json(); console.log(response_json.data); } else { response.text().then(text => {throw new Error(text)}) } }
curl -X PUT https://events.unl.edu/api/v2/calendar/3809/event/12345/status/ \ -H "Content-Type: application/json" \ -H "Authentication: MY_API_TOKEN" \ -d '{ "status": "pending", }'
function eventsAPI() { $data = array( 'status' => 'pending', ); $jsonData = json_encode($data); $apiToken = 'MY_API_TOKEN'; $url = 'https://events.unl.edu/api/v2/calendar/3809/event/status/'; $headers = array( 'Content-Type: application/json', 'Authentication: ' . $apiToken, ); // Initialize cURL session $ch = curl_init(); // Set cURL options curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PUT'); curl_setopt($ch, CURLOPT_POSTFIELDS, $jsonData); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); // Execute cURL session and get the response $response = curl_exec($ch); // Check if cURL request was successful if ($response === false) { // Handle cURL error echo 'cURL Error: ' . curl_error($ch); } else { $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); if ($httpCode === 200) { // Successful response $responseData = json_decode($response, true); var_dump($responseData); } else { // Error response echo 'API Error: ' . $response; } } // Close cURL session curl_close($ch); }
Delete
DELETE
http://events.unl.edu/api/v2/calendar/{calendar_id}/event/{event_id}/
This endpoint is for deleting a specific calendar event based on its ID.
HTTP Method
DELETE
Authentication Requirements
You must add a header to the request with the header key being Authentication
and the value being your API Token.
Request Data
-
calendar_id
string | number Required PathID or shortname of the calendar the event will be in. This will go into the path of the request. -
event_id
number Required PathID the event to be looked up. This will go into the path of the request.
Response Data
-
Status
numberStatus code for the request. -
Message
stringStatus message for the request. -
Data
nullThis will never have data to return.
Example Code
async function eventsAPI() { // Sends request with method, headers, and data const response = await fetch( 'https://events.unl.edu/api/v2/calendar/3809/event/12345/', { method: 'DELETE', headers: { 'Authentication': MY_API_TOKEN, } } ); // Checks response and throws error on error if (response.ok) { const response_json = await response.json(); console.log(response_json.data); } else { response.text().then(text => {throw new Error(text)}) } }
curl -X DELETE https://events.unl.edu/api/v2/calendar/3809/event/12345/ \ -H "Authentication: MY_API_TOKEN"
function eventsAPI() { $apiToken = 'MY_API_TOKEN'; $url = 'https://events.unl.edu/api/v2/calendar/3809/event/12345/'; $headers = array( 'Authentication: ' . $apiToken, ); // Initialize cURL session $ch = curl_init(); // Set cURL options curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'DELETE'); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); // Execute cURL session and get the response $response = curl_exec($ch); // Check if cURL request was successful if ($response === false) { // Handle cURL error echo 'cURL Error: ' . curl_error($ch); } else { $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); if ($httpCode === 200) { // Successful response $responseData = json_decode($response, true); var_dump($responseData); } else { // Error response echo 'API Error: ' . $response; } } // Close cURL session curl_close($ch); }
- Printer-friendly version
- Log in to post comments