Brian, this was very helpful! I have one question, however. Where/how can I add the course meeting times?
Thanks very much,
Brian Pugh
Brian P -
There are a collection of API calls required to extract all of the information related to meeting times. It gets ugly.
If you care about where the section meets in addition to when, you will need Building List.
Get the list of active schedule sets for the academic year, and figure out which ones you care about. Schedule Set List.
For each schedule set, get the details (rotation days and meeting times). Schedule Set (single item)
Then get a list of every section in the division Section list (by school level)
For each section get the schedule (Cycles by Section) - 1 call to the API per section.
Put everything together by using the ID fields that are common to each piece of the puzzle.
My program takes about 5 minutes to plow through 1500 sections. I run the program one per day and write the info to a file that my other programs use.
level_num = ?
The level number comes from a call to Level List. You get a list of all of your defined levels (Middle School, Upper School, etc) and the ID number associated with that level.
Schedule Set (single item) / schedule_set_id =?
The schedule set ID comes from a call to Schedule Set List. The required argument is the level number (that is, the level ID for your Middle School or Upper School). Optional arguments are the current academic year (default is the current year), and the group type (default is 1 for Academics).You get a list of all of the schedule sets associated with the school level for the given year. One field in the data returned is the schedule set ID number.
Cycles by Section duration_id ?
The duration_id is the ID number for the term. The default is the current term. You can get the ID for other terms in from Term List.
group_type ?
Offering Type list reports the group types and the associated IDs. You can use the Try It button to run it for your database to see what the numbers are, and then just add the number directly to your code.
Is there 'somewhere' where I can find these
I just spent a lot of time in the API Endpoints pages and running Try It examples. The trick is that the endpoint names aren't always exactly what you would expect (duration ID is in Term List; group_type is in Offering Type List; etc).