Media Web Service

Delivering CSUN Individuals Media Information


The Media Web Service leverages NameCoach to retrieve an individual’s profile image and their pre-recorded name pronunciation. The web service provides a gateway via a REST-ful API. The information is retrieved by creating a specific URI and giving values to filter the data. The information that is returned is a JSON object that contains media information of a particular CSUN individual. The format of the JSON object is as follows:

    "success": "true",
    "status": "200",
    "api": "media",
    "version": "1.1",
    "collection": "media",
    "count": "3",
    "media": [
            "audio_recording": "",
            "avatar_image": "",
            "photo_id_image": ""

Getting Started

  1. GENERATE THE 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 URI to query your data. See the Usage Example session.

Loop through the data to display its information. See the Usage Example section.


All Persons Media Listing


Specific Media Retrieval Raw Resource Retrieval

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) {
        // print the image url

//generate a url
$url = '';

//add extra necessary
$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
echo $data['avatar_image'];

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
print data['avatar_image']

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
data = JSON.parse(response)

#print the value
puts "#{data['avatar_image']}"