Degrees Web Service

Delivering Degree information about CSUN Faculty


The Degrees web service provides a web service as an interface for requesting information about a professor's degree and institutional background. This information is derived through CSUN's catalog. The data is generated through a RESTful API by simply appending a name value pair at the end of a URI. The web service uses HTTP requests to specific URL's and the service returns data in a form of JSON object that contains information including degree, year, and institution. An example of JSON object returned:
    appt_year: "1994",
    degrees: [
            "degree": "Ph.D.",
            "year": "2008",
            "institute": "University of California Los Angeles",
            "degree": "M.S.",
            "year": "2003",
            "institute": "University of California Los Angeles",
            "degree": "B.S.",
            "year": "2000",
            "institute": "University of California Los Angeles",

How to use

  1. GENERATE A UNIQUE URI: Find the usage that fits your need. Browse through subcollections, instances and query types to help you craft your URI.
  2. PROVIDE THE DATA: Use the constructed URI to send a query request - See the Usage Example section.
  3. SHOW THE RESULTSLoop through the returned JSON Object to display the information. - See the Usage Example section below.
Take this URI for example:
Append a professor's email address as the value to the key 'person':
Use the generated URL as a query:
Examples of ready to use URL's: Click to see JSON Object

Code Samples

//construct a function to get url and iterate over
$(document).ready(function() {
    //generate a url
    var url = '';
    //use the URL as a request
        url: url
    }).done(function(data) {
        // save the degree list
        var degreeList = data.degrees;
        //iterate over the degree list
        $(degreeList).each(function(index, degree) {
            //append each degree and institute
            $('#degree-results').append( + ' ' + + '<br>');

//generate a url
$url = '';

//add extra necessary options
$arrContextOptions = [
    "ssl" => [

//perform the query
$data = file_get_contents($url, false, stream_context_create($arrContextOptions));

//decode the json
$data = json_decode($data, true);

//iterate over the list of data and print
foreach($data['degrees'] as $degree){
    echo = $degree['degree'] . ' ' . $degree['institute'].'<br>';

import urllib2
import json

#generate a url
url = u''

#open the url
    u = urllib2.urlopen(url)
    data =
except Exception as e:
    data = {}

#load data with json object
data = json.loads(data)

#iterate over the json object and print
for degree in data['degrees']:
    print degrees['degree'] + ' ' + degrees['institute']

require 'net/http'
require 'json'

#generate a url
source = ''

#prepare the uri
uri = URI.parse(source)

#request the data
response = Net::HTTP.get(uri)

#parse the json
degrees = JSON.parse(response)

#print the json
degrees['degrees'].each do |degree|
    puts "#{degree['degree']} #{degree['institute']}"