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 query
    The search query for finding specific calendars. Type in a UID to find their personal calendar.

Response Data


  • Status number
    Status code for the request.
  • Message string
    Status message for the request.
  • Data Array of Calendar Objects | null
    The requested calendars data or null on error.
    • id string
      The ID of the calendar.
    • name string
      The name of the calendar.
    • short-name string
      The short name of the calendar. This can be used in the URL of other events API v2 requests.
    • default-timezone string
      The default timezone of the calendar. This can be overridden by event's data times.
    • webpage string | null
      The webpage of the calendar or null if none is set.
    • email-list string | null
      The list of emails for the calendar or null if none is set. Emails will be separated by commas.
    • event-release-preference string
      The release process for events after they are created on the calendar.
    • recommendations-within-account bool
      Whether 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';
    }
}
Contributed By: 
DXG