⛔Never push sensitive information such as client id's, secrets or keys into repositories including in the README file⛔
This Candidate Account Api solution is part of the FindAnApprenticeship project. This represents the inner API for candidate and application data for the Find an apprenticeship service.
- A clone of this repository
- A code editor that supports Azure functions and .NetCore 8.0
- An Azure Active Directory account with the appropriate roles as per the config
- SQL server - Publish the
SFA.DAS.CandidateAccount.Database
project to create the SQL database - Azure Storage Emulator(https://learn.microsoft.com/en-us/azure/storage/common/storage-use-emulator)
The Candidate Account api uses the standard Apprenticeship Service configuration. All configuration can be found in the das-employer-config repository.
- appsettings.json file
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"AllowedHosts": "*",
"ConfigurationStorageConnectionString": "UseDevelopmentStorage=true;",
"ConfigNames": "SFA.DAS.CandidateAccount.Api",
"EnvironmentName": "LOCAL",
"Version": "1.0"
}
You must have the Azure Storage emulator running, and in that a table created called Configuration
in that table add the following:
Azure Table Storage config
Row Key: SFA.DAS.CandidateAccount.Api_1.0
Partition Key: LOCAL
Data:
{
"CandidateAccountConfiguration": {
"ConnectionString": "Data Source=.;Initial Catalog=SFA.DAS.CandidateAccount;User Id=sa;Password={YOUR_PASSWORD};Pooling=False;Connect Timeout=30;Encrypt=False;"
},
"AzureAd": {
"tenant": "***.onmicrosoft.com",
"identifier": "https://*****.onmicrosoft.com/"
}
}
- .NetCore 8.0
- SQL
- Azure Table Storage
- NUnit
- Moq
- FluentAssertions
- Open command prompt and change directory to /src/SFA.DAS.CandidateAccount.Api/
- Run the web project /src/SFA.DAS.CandidateAccount.Api/SFA.DAS.CandidateAccount.Api.csproj
MacOS
ASPNETCORE_ENVIRONMENT=Development dotnet run
Windows cmd
set ASPNETCORE_ENVIRONMENT=Development
dotnet run
Application logs are logged to Application Insights and can be viewed using Azure Monitor at https://portal.azure.com
https://localhost:7277/api/Candidate/{candidateId} - Endpoint to get candidate information by given candidate id.
https://localhost:7277/api/Candidate/{candidateId}/about-you - Endpoint to get about you information by given candidate id.
https://localhost:7277/api/Candidate/{candidateId}/address - Endpoint to get address information by given candidate id.
https://localhost:7277/api/Candidates/{candidateId}/applications - Endpoint to get all applications
https://localhost:7277/api/Candidates/{candidateId}/applications/{applicationId} - Endpoint to get application information by given application id.
https://localhost:7277/api/Candidates/{candidateId}/applications/GetByReference/{vacancyReference} - Endpoint to get application by given vacancy reference.
Licensed under the MIT license