A newer version of the Ed-Fi ODS / API is available. See the Ed-Fi Technology Version Index for a link to the latest version.
Year-Specific ODS Configuration
- Ian Christopher (Deactivated)
- Vinaya Mayya
Some implementations find it useful to add a school year in the API root, for example, as part of a partitioning strategy or to distinguish data associated with previous years from data for the current year. In the Ed-Fi ODS / API, the presence of the school year value in the API root is configurable, and off by default.
The school year can be configured in the API route through the following steps:
- Update
owin:appStartup
key in the Web.config of the EdFi.Ods.WebApi project to:<add key="owin:appStartup" value="YearSpecific" />
- Update
swagger.webApiMetadataUrl
key in the Web.config of the EdFi.Ods.SwaggerUI project to, for example:<add key="swagger.webApiMetadataUrl" value="http://localhost:54746/metadata/2019/" />
Initialize development environment for year-specific configuration using the initdev command as outlined in the Getting Started Guide.
As an example: from a PowerShell prompt, navigate to the Ed-Fi-ODS-Implementation folder and run the Initialize-PowershellForDevelopment.ps script, followed by the initdev command passing InstallType and OdsTokens parameters. OdsTokens is a semicolon-separated list of school years:
initdev -InstallType YearSpecific -OdsTokens '2019;2020'
- The same parameters noted above can be used with the deployment script packaged with EdFi.RestApi.Databases NuGet for non-development environments.
See the Extensibility & Customization section for information on using year-specific configuration as a facet of a partitioning strategy.