These APIs provide the ability to look up an email address and kerberos ID by employee ID. If you need assistance with this APIs, please email middleware-api@ucdavis.edu.
Audience
Excerpt
This documentation is intended for those wishing to look up email addresses and kerberos IDs via the REST with JSON interface.
This is currently the only interface available for this API. If you would like to see an XML interface please email middleware-api@ucdavis.edu.
Application requirements
Each request must provide a valid application key. You may sign up for your own application key here <INSERT LINK>.
During periods of peak usage, API requests may be throttled.
Using the JSON interface
The easiest way to start learning about this interface is to try it out. This section shows how to use the curl command line tool to execute sample queries.
These commands perform a lookup of an email address and kerberos ID by employee ID (in the first line), or by loginid (in the second line). The response has a Content-Type of text/javascript.
The JSON interface is exposed through a uniform URL that contains CGI arguments. Your application can use an HTTP stack of its choosing. In order to use the JSON interface:
You must construct a properly formatted URL with all necessary CGI arguments.
You must send an HTTP referer header that accurately identifies your application.
You must process the JSON-encoded response.
Request format
URL base address
The standard URL for the Email and Kerberos Lookup API is:
This section describes the arguments that can be used for lookup requests.
The value of a CGI argument must always be properly escaped. This can be done via the functional equivalent of JavaScript's encodeURIComponent() method.
Required URL arguments
The following table lists the required URL arguments.
Argument
Example
Description
key
key=your-key
This argument supplies the application's key. You can sign up for an API key <INSERT LINK HERE>. It must be a valid key associated with your application. The key is required for this API to implement quality of service rules for this API. If your application is making too many requests it will be throttled to ensure resources are not overloaded during times of peak usage. Also, by supplying a key we can identify and contact you should something go wrong with your application.
type
type=loginid
The type argument should either be left off entirely, or set as 'type=loginid', to specify that instead of an employeeid, you're passing in a loginid.