The Data API is a RESTful, primarily read-only web service for accessing Bellevue College data in JSON format.
docs/api- The documentation endpoint for the Data API (thanks to Scramble)
-
api/v1/course/{CourseID}- Return course info for given course given the CourseID -
api/v1/course/{Subject}/{CourseNumber}- Return course info for given course given the subject and course number -
api/v1/courses/{Subject}- Return active courses for a given subject -
api/v1/courses/multiple?courses[]={courseid}&courses[]={courseid}...- Uses
courses[]query parameter in repeating fashion to specify multiple courses for which to have information returned.
- Uses
-
api/v1/quarters- Return active/viewable quarters -
api/v1/quarter/current- Returns the current quarter. -
api/v1/quarter/{YearQuarterID}?format={strmoryrq}- Return info for the specified quarter. Defaults to lookup by YRQ. STRM can be used if format is set tostrm. -
api/v1/subjects- Return all subjects -
api/v1/subjects?filter=active-credit"- Return only active, non-CE subjects -
api/v1/subjects/{YearQuarterID}- Return subjects offered for specified quarter -
api/v1/subject/{Subject}- Return subject info for given subject (slug) -
api/v1/classes/{YearQuarterID}/{Subject}- Return course and class/section info offered given specified quarter and subject/department -
api/v1/classes/{YearQuarterID}/{Subject}/{CourseNumber}- Return specific course and section/class info given a quarter, subject/department, and course number
Form Data endpoints are write-only, and accept POSTS with specific parameters and store the data for future reporting. Due to external requirements, they require HTTP Basic authentication using a Client ID and Client Key generated within the Admin interface.
api/v1/forms/pci/transactions- Accepts POST of transaction data (protected - HTTP Basic Auth)
api/v1/auth/login- The endpoint to authenticate and retrieve a valid token so protected data endpoints can be used. (protected)api/v1/directory/employees- Return list of all employee usernames (protected)api/v1/directory/employees/{part of name}- Return a list of employee usernames that match the provided substring of name (protected)api/v1/directory/employee/{username}- Return employee directory information given a username (protected)
api/v1/internal/auth/login- The endpoint to authenticate and retrieve a valid token so protected data endpoints can be used. (protected)api/v1/internal/employee/{username}- Return basic employee information given a username (protected)api/v1/internal/student/{username}- Return basic student information given a username (protected)
api/v1/forms/pci/transaction- Record POSTed transaction data (protected)api/v1/forms/pci/transaction/test- Don't Record (protected)
There is a simple admin interface to allow creation and removal of API credentials. It is only available on the internal subdomain.
admin/login- Login interface (protected)
For explanation on terminology/objects used in the DataAPI, refer to the terminology documentation.
Data API uses Laravel Sail for a local development environment.
With Docker installed, run ./vendor/bin/sail up to build and start the VM.
Alternativly, you can use Podman instead of docker with some additional configuration; good info on this in this medium article
Once Sail informs you of the IP address it is using, add the following entries to your hosts file:
# Laravel Sail
0.0.0.0 data-api.test
0.0.0.0 no.data-api.test
To support SSL, you'll also need to generate a certificate and key.
openssl req -newkey rsa:2048 -nodes \
-keyout docker/nginx/ssl/data-api.key \
-x509 -days 365 \
-out docker/nginx/ssl/data-api.crt \
-subj "/CN=*.data-api.test"When upgrading to a new version of PHP, the Dockerfile may need to be updated as well.
Lines 28 and 46 of /docker/8.1/Dockerfile were added in order to add SQL Server support.
| Trunk | Dev |
|---|---|
Make sure to set the following environment variables:
AZURE_CLIENT_ID- The client ID of the Azure Entra ID applicationAZURE_CLIENT_SECRET- The client secret of the Azure Entra ID applicationAZURE_TENANT_ID- The tenant ID of the Azure Entra ID applicationAZURE_REDIRECT_URI- The redirect URI of the Azure Entra ID application (e.g.https://no.data-api.test/admin/login/callback)