[API] Return count of courses in call to TERMs

Add the ability to return the number of courses for a given TERM, either by default, or by passing an include value on the query string.

Example:

https://hostname.instructure.com/api/v1/accounts/1/terms/1?include[]=total_courses

would show the total number of courses:

{
"id": 1,
"name": "Default Term",
"start_at": null,
"end_at": null,
"created_at": "2017-03-20T14:04:19Z",
"workflow_state": "active",
"grading_period_group_id": null,
"sis_term_id": null,
"sis_import_id": null,"overrides": {},
"total_courses": 305
}

 

Added to Theme

Build new or more robust API endpoints Theme Status: Identified

3 Comments
Stef_retired
Instructure Alumni
Instructure Alumni
Status changed to: Open
 
KristinL
Community Team
Community Team
Status changed to: New
 
KristinL
Community Team
Community Team
Status changed to: Added to Theme