The API encapsulates ROATP course management data which is mainly for managing the courses delivery details for all the providers. This solution has two main projects:
There are two sets of endpoints:
- Management: These endpoints are used by
course management websolution (https://github.com/SkillsFundingAgency/das-roatp-coursemanagement-web) which communicates with it via the outer api layer (https://github.com/SkillsFundingAgency/das-apim-endpoints/tree/master/src/RoatpCourseManagement)find apprenticeship training websolution (https://github.com/SkillsFundingAgency/das-findapprenticeshiptraining) which communicates with it via the outer api layer (https://github.com/SkillsFundingAgency/das-apim-endpoints/tree/master/src/FindApprenticeshipTraining)
- Integration: These endpoint are used by other services for integration purpose
The SFA.DAS.Roatp.Jobs project that contains functions to reload standards, reload provider details, update provider address and coordinates and import provider achievement rates.
| Function Name | Trigger | Description |
|---|---|---|
| DeleteExpiredShortlistsFunction | Timer | Removes expired shortlists via the outer API. |
| ImportAnnualFeedbackSummariesFunction | Timer | Imports annual apprentice and employer feedback summaries when data for the configured period is not already present. |
| RefreshAllProviderDetailsFromUkrlpFunction | Http Request | Updates all the providers details from UKRLP. This function is triggered manually to refresh all provider details when needed. |
| RefreshProviderDetailsFromUkrlpFunction | Timer | Updates details for providers updated since the last run. |
| UpdateProviderAddressCoordinatesFunction | Timer | Updates stored provider address coordinates. This function has to run after RefreshProviderDetailsFromUkrlpFunction so any address changes can be picked up. |
| ReloadProviderRegistrationDetailsFunction | Timer | Reloads provider registration details from Roatp V1, Updates coordinates for any new provider addresses. |
| ReloadStandardsCacheFunction | Timer | Refreshes the standards cache from course api. |
| SendInitialForecastEmailsFunction | Timer | Sends initial forecast reminder emails for recently added short courses. |
| SendForecastsReminderEmailsFunction | Timer | Sends periodic forecast reminder emails to providers with short courses that have missing or out-of-date forecasts. |
You will need following on your local:
- A clone of this repository
- Visual studio or similar IDE
- .Net 10.0 SDK
- Azurite or similar local storage emulator
- SQL Database
- Setup
RoatpCourseManagementouter api solution indas-apim-endpoints. This has its own dependencies which will be required to be setup as well, see its readme for further instructions.
-
Create a
Configurationtable in your (Development) local storage account. -
Obtain the SFA.DAS.Roatp.Api.json from the das-employer-config and adjust the SqlConnectionString property to match your local setup.
-
Add a row to the Configuration table with fields:
- PartitionKey: LOCAL
- RowKey: SFA.DAS.Roatp.Api_1.0
- Data: {The contents of the
SFA.DAS.Roatp.Api.jsonfile}
-
Obtain the SFA.DAS.Roatp.Jobs.json from the das-employer-config for roatp-api repo
-
Add a row to the Configuration table with fields:
- PartitionKey: LOCAL
- RowKey: SFA.DAS.Roatp.Jobs_1.0
- Data: {The contents of the
SFA.DAS.Roatp.Jobs.jsonfile}
-
In the
SFA.DAS.Roatp.Apiproject, addappSettings.Development.jsonfile with following content:
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information",
"Microsoft.EntityFrameworkCore.Database.Command": "Information"
}
},
"AllowedHosts": "*",
"ConfigurationStorageConnectionString": "UseDevelopmentStorage=true;",
"ConfigNames": "SFA.DAS.Roatp.Api",
"Environment": "LOCAL",
"Version": "1.0",
"APPINSIGHTS_INSTRUMENTATIONKEY": ""
}- In the
SFA.DAS.Roatp.Jobsproject, addlocal.settings.jsonfile with following content:
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
}
},
"IsEncrypted": false,
"Values": {
"AzureWebJobsStorage": "UseDevelopmentStorage=true;",
"FUNCTIONS_WORKER_RUNTIME": "dotnet-isolated",
"ConfigurationStorageConnectionString": "UseDevelopmentStorage=true;",
"EnvironmentName": "LOCAL",
"LoggingRedisConnectionString": "localhost",
"QarTimePeriod": "202223",
"QarOverallImportFileName": "app-narts-subject-and-level-detailed.csv",
"QarProviderLevelImportFileName": "app-narts-provider-level-fwk-std.csv",
"DeleteExpiredShortlistsSchedule": "0 0 2 * * *",
"ImportAnnualFeedbackSummariesFunctionSchedule": "0 0 4 1-10 8 *",
"ReloadStandardsCacheSchedule": "0 0 20 * * 1-5",
"ReloadProviderRegistrationDetailsSchedule": "0 0 21 * * 1-5",
"SendInitialForecastEmailsFunctionSchedule": "0 0 3 * * *",
"SendForecastsReminderEmailsFunctionSchedule": "0 0 0 15 3,6,9,12 *",
"UpdateUkrlpDataSchedule": "0 0 23 * * 1-5",
"UpdateProviderAddressCoordinatesSchedule": "0 30 23 * * 1-5",
"AzureWebJobs.DeleteExpiredShortlistsFunction.Disabled": true,
"AzureWebJobs.ImportAnnualFeedbackSummariesFunction.Disabled": true,
"AzureWebJobs.ReloadStandardsCacheFunction.Disabled": true,
"AzureWebJobs.ReloadProviderRegistrationDetailsFunction.Disabled": true,
"AzureWebJobs.SendInitialForecastEmailsFunction.Disabled": true,
"AzureWebJobs.SendForecastsReminderEmailsFunction.Disabled": true,
"AzureWebJobs.RefreshAllProviderDetailsFromUkrlpFunction.Disabled": true,
"AzureWebJobs.RefreshProviderDetailsFromUkrlpFunction.Disabled": true,
"AzureWebJobs.UpdateProviderAddressCoordinatesFunction.Disabled": true
}
}- Publish the database project
SFA.DAS.RoATP.Databaseto your local SQL Server instance. - Seed following tables via manual scripts or by running respective jobs
- Standard: run job
ReloadStandardsCacheFunction - ProviderRegistrationDetail: run jobs in this order
ReloadProviderRegistrationDetailsFunction,LoadAllProviderAddressesFunction