Employee Database API Documentation

Written by Michael Rothfuss – 08/29/13


The Employee Database provides a web service which allows third party programs or websites to connect and access data provided.

The newest version of this document can be found here: http://cas.umt.edu/facultydatabase/2013_API/Documentation.doc

Guided Connection

The first step in connecting to the web service is to build a list of arguments to query the database with. As these arguments are all identification numbers, we have built a tool to help you generate your list of arguments. The tool will ask you to select items from lists of schools, departments, faculty types, and faculty tags. If no schools are selected, for example, then all schools will be queried. The tool will then provide two URLs, one for JSON data and another for XML data. The third party program may then download the data by using the chosen URL.

Tool URL: http://cas.umt.edu/facultydatabase/2013_API/helper.php

Advanced Connection: URL Options and Arguments
The options offered by this API are 'school', 'department', 'type', 'tag', and 'id'. Each one of these options takes a comma separated list of integers as its argument.

There are two other options, 'XML' and 'JSON'. These options have no arguments, they specify what format the data will be transported in.

API Base Path: http://cas.umt.edu/facultydatabase/2013_API/server.php
Example Options & Arguments: /school/15,17/JSON
Example URL: http://cas.umt.edu/facultydatabase/2013_API/server.php/school/15,17/JSON

Data Output

The API returns the following items per matched faculty: ID, FirstName, LastName, Photo, Title, PersonalURL, CVURL, Email, OfficeLocation, Phone, Fax, OfficeHours, CurrentPosition, Courses, Affiliations, Education, Honors, FieldOfStudy, TeachingExperience, ProfessionalExperience, InternationalExperience, SpecializedSkills, publications, SelectedPublications, Projects, ResearchInterests, Summery, Hobbies, and all Custom Fields applied to that faculty member. The output is ordered by LastName then FirstName.

PHP Example Connection with JSON
In this example, we will display a list of last names of the faculty in the 'Spectral Fusion Designs' department with the applied tag 'Programmer'.

Code Example

$raw = file_get_contents('http://cas.umt.edu/facultydatabase/2013_API/server.php/school/19/department/1/tag/72/JSON');
$data = json_decode($raw);
for each($data as $person){
     echo $person->LastName.'<br>';