Skip to main content
This is documentation for an older release that is still maintained. Latest version
Version: 6.2

Resource Dependency Order

Resources must be loaded into an Ed-Fi ODS / API instance according to a set dependency order.

Dependency Order Overview

The dependency order is enforced through entity relationships in the ODS database or by authorization.

  • Dependency order enforced by the entity relationships. Like in any relationship-based database, many entities in the ODS have foreign key relationships with other entities. The ODS / API will return validation errors if constraints for these relationships are not met. While loading or updating data it is important to consider these dependencies to avoid validation errors from the database.
  • Dependency order enforced by authorization. Many resources in the ODS / API are authorized by their relationship to education organization and/or people. For example, access to Student and student-related data is restricted by the StudentSchoolAssociation. The same is true for staff members and their relationships provided by the StaffEducationOrganizationEmploymentAssociation and the StaffEducationOrganizationAssignmentAssociation. Access to Parent information is restricted by the accessible Students and their StudentParentAssociations. For example, if "Student A" is accessible, then any Parents to which Student A has a StudentParentAssociation will be accessible as well.

Loading Sequence

The diagram is organized into two sections:

Core Loading Sequence (top) — flows top-to-bottom following dependency order. Each tier must be fully loaded before proceeding to the next. Nodes at the same tier can be loaded in parallel. The (xx) notation indicates loading dependency order number. The dashed Additional Student Domain node is an abstraction placeholder — it expands into the full detail shown in the lower section.

Additional Student Domain (bottom) — shows the entities loaded after student enrollment is established. These nodes are largely independent of each other and can be loaded in parallel. Only Teaching & Learning #2 has a dependency within this group, flowing into Student Grade Domain.

ColorDomain Category
GreenCore structure (descriptors, ed org, calendar, teaching & learning, graduation, cohort)
BlueStudent-related entities
GoldStaff-related entities
Dashed borderAbstraction placeholder (expands into Additional Student Domain)

Core Loading Sequence

The (xx) notation indicates loading dependency order number.

Additional Student Domain

note

All dependencies must be satisfied above before running any of the logic here.

Download the diagram: [ PDF Version | Vizio format ]

Domain Reference

Core Loading Sequence

Education Organization Domain

EntityOrderNotes
Descriptors1Foundation for all coded values
Local Education Agency4Required before School
School5Required before calendar/schedule entities

School Calendar Domain

EntityOrderNotes
Grading Period6Parallel with Calendar
Calendar6Parallel with Grading Period
Calendar Date7Requires Calendar
Session7Requires Grading Period

Teaching & Learning Domain

EntityOrderNotes
Location6Parallel with Class Period
Class Period6Parallel with Location
Bell Schedule7Requires Class Period
Course8Requires Ed Org
Course Offering9Requires Course + Session
Section10Requires Course Offering + Location + Class Period

Graduation Domain

EntityOrderNotes
Graduation Plans12Requires Section

Student & Contact

EntityOrderNotes
Student3Insert only at this stage
Contact3Insert only at this stage
Student School Assoc.13Requires Student + School

Student Cohort Domain

EntityOrderNotes
Cohort9Requires Ed Org

Staff Ed Org Assoc. Domain

EntityOrderNotes
Staff16Insert only at this stage
Staff Ed Org Employment Assoc.17OR use Assignment Assoc.
Staff Ed Org Assignment Assoc.18OR use Employment Assoc.
Staff (Update)19Full staff detail update
Staff School Assoc.19Requires Staff + School
Staff Section Assoc.19Requires Staff + Section
Staff Cohort19Requires Staff + Cohort

Additional Student Domain

Student ID & Demographics

EntityOrderNotes
Student (Update)14Full demographic update
Student Ed Org Assoc.14Requires Student + Ed Org
Student Contact Assoc.14Requires Student + Contact
Contact (Update)15Full contact detail update

Student Attendance Domain

EntityOrderNotes
School Attendance Event14Requires Student School Assoc.
Section Attendance Event14Requires Student Section Assoc.

Teaching & Learning #2

EntityOrderNotes
Student Section Assoc.14Requires Student + Section
Grade15Requires Student Section Assoc. + Grading Period

Student Cohort Domain

EntityOrderNotes
Student Cohort14Requires Student + Cohort

Student Academic Record

EntityOrderNotes
Academic Record14Requires Student School Assoc.
Course Transcript19Requires Academic Record + Section

Alt. Supplemental Services

EntityOrderNotes
Program8Requires Ed Org
Student Program14Requires Student + Program
Student CTE14Requires Student Program
Student Homeless14Requires Student Program
Language Instruction14Requires Student Program
Student Migrant14Requires Student Program
Neglected / Delinquent14Requires Student Program
School Food Service14Requires Student Program
Title I Part A14Requires Student Program

Discipline Domain

EntityOrderNotes
Discipline Incident6Requires Ed Org
Student Incident Behavior14Requires Student + Discipline Incident
Discipline Action19Requires Student Incident Behavior

Dependency Order Endpoint

As an API client developer, it is useful to know the dependency order of resources to load the data and minimize authorization and validation errors in API responses.

The ODS / API provides a dependency metadata endpoint at /metadata/data/v3/dependencies to show this dependency order based on each HTTP operation. The default GET generates a JSON response with an order group of resource endpoints that can be loaded at the same time. The response also includes the "Create" and "Update" operations that can be performed in that order group. "Delete" operations are to be performed at the reverse order of Create operations. API Client developers can use this as documentation or can use it programmatically for orchestration of API calls.

Partial listing of the Dependencies endpoint
{
...
{
"resource": "/ed-fi/studentTransportations",
"order": 14,
"operations": [
"Create",
"Update"
]
},
{
"resource": "/tpdm/financialAids",
"order": 14,
"operations": [
"Create",
"Update"
]
},
{
"resource": "/ed-fi/contacts",
"order": 15,
"operations": [
"Update"
]
},
{
"resource": "/ed-fi/credentials",
"order": 15,
"operations": [
"Create",
"Update"
]
},
{
"resource": "/ed-fi/grades",
"order": 15,
"operations": [
"Create",
"Update"
]
}
...
}

Adding a header Accept with a value of application/graphml can be passed to obtain dependency output in the graphml XML format.

Partial listing of the Dependencies endpoint in GraphML
<?xml version="1.0" encoding="UTF-8"?>
<graphml xmlns="http://graphml.graphdrawing.org/xmlns" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://graphml.graphdrawing.org/xmlns http://graphml.graphdrawing.org/xmlns/1.0/graphml.xsd">
<graph id="EdFi Dependencies" edgedefault="directed">
<node id="/ed-fi/absenceEventCategoryDescriptors"/>
<node id="/ed-fi/academicHonorCategoryDescriptors"/>
<node id="/ed-fi/academicSubjectDescriptors"/>
<node id="/ed-fi/academicWeeks"/>
<node id="/ed-fi/accommodationDescriptors"/>
<node id="/ed-fi/accountabilityRatings"/>
<node id="/ed-fi/accountTypeDescriptors"/>
<node id="/ed-fi/achievementCategoryDescriptors"/>
...

The example below shows the dependency order enforced by authorization on the Students resource. You can see that Student creation is at order 3, StudentSchoolAssociation creation is at order 13, and the Student update is at order 14. This shows that a client cannot edit a student record it has created until an enrollment record has been established.

{
...
{
"resource": "/ed-fi/students",
"order": 3,
"operations": [
"Create"
]
},
...
{
"resource": "/ed-fi/studentSchoolAssociations",
"order": 13,
"operations": [
"Create",
"Update"
]
},
...
{
"resource": "/ed-fi/students",
"order": 14,
"operations": [
"Update"
]
},
...
}
note

You can explore the dependency endpoint at the Ed-Fi Alliance-hosted sandbox: Dependency Endpoint in Ed-Fi ODS / API Sandbox