Skip to Content

Faculty API

The Faculty API provides access to faculty data across different departments, years, and appointment types at Albion College.

Endpoint

GET /api/data/faculty

Authentication

All requests to this endpoint require authentication using an API key. You can provide your API key in one of the following ways:

  • HTTP Header: X-API-Key: your_api_key
  • Bearer Token: Authorization: Bearer your_api_key
  • Query Parameter: ?apiKey=your_api_key

If you don’t have an API key, you can obtain one from your dashboard settings.

Query Parameters

ParameterTypeRequiredDescription
departmentIdIntegerNoFilter results by department ID
yearStringNoFilter results by academic year (e.g., “2022-2023”)
appointmentTypeStringNoFilter results by appointment type (e.g., “Tenure-Track”, “Adjunct”)
pageIntegerNoPage number for pagination (default: 1)
limitIntegerNoNumber of results per page (default: 100, max: 1000)
sortByStringNoField to sort by (department, appointment_type, year, count)
sortOrderStringNoSort order (asc or desc)

Note: If none of the filter parameters (departmentId, year, appointmentType) are provided, the API returns data for all faculty.

Response Format

The API returns a JSON response with the following structure:

{ "success": true, "data": [ { "id": 1, "department": "Biology", "appointment_type": "Tenure-Track", "year": "2022-2023", "count": 12 }, { "id": 2, "department": "Biology", "appointment_type": "Adjunct", "year": "2022-2023", "count": 5 }, ], "pagination": { "total": 150, "page": 1, "limit": 100, "totalPages": 2 } }

Response Fields

FieldDescription
successBoolean indicating if the request was successful
dataArray of faculty records
data[].idUnique identifier for the record
data[].departmentName of the academic department
data[].appointment_typeType of faculty appointment (e.g., “Tenure-Track”, “Adjunct”)
data[].yearAcademic year of the faculty data (e.g., “2022-2023”)
data[].countNumber of faculty members matching the criteria
pagination.totalTotal number of records available
pagination.pageCurrent page number
pagination.limitNumber of records per page
pagination.totalPagesTotal number of pages available

Examples

Get All Faculty Data

curl -X GET "https://openalbion.org/api/data/faculty" \ -H "X-API-Key: your_api_key"

Filter by Department

curl -X GET "https://openalbion.org/api/data/faculty?departmentId=5" \ -H "X-API-Key: your_api_key"

Filter by Year

curl -X GET "https://openalbion.org/api/data/faculty?year=2022-2023" \ -H "X-API-Key: your_api_key"

Filter by Appointment Type

curl -X GET "https://openalbion.org/api/data/faculty?appointmentType=Tenure-Track" \ -H "X-API-Key: your_api_key"

Pagination and Sorting

curl -X GET "https://openalbion.org/api/data/faculty?page=2&limit=50&sortBy=count&sortOrder=desc" \ -H "X-API-Key: your_api_key"

Error Responses

Status CodeDescription
401Authentication error (missing or invalid API key)
500Server error

Example error response:

{ "success": false, "error": "API key missing", "message": "Please provide an API key via X-API-Key header, Authorization: Bearer header, or apiKey query parameter.", "docs": "https://docs.openalbion.org" }