An ASP.NET Core web application providing APIs for managing user data, service data, and field access settings with hierarchical access control. This project demonstrates secure data handling, a frontend interface, and downloadable PowerShell scripts for data management.
The application is accessible at https://api.cronotech.us.
View the Swagger documentation at https://api.cronotech.us/swagger for a full list of available endpoints and details.
The User Data API provides access to personal user data with field-specific access levels. Only users with appropriate access levels can view certain data fields.
GET /api/UserData
POST /api/UserData/request
Request Body:
{
"userEmail": "user@example.com",
"requesterAccessLevel": "Confidential"
}
The Service Data API manages and provides access to service-related information, secured with role-based access controls for each field.
GET /api/ServiceData
POST /api/ServiceData/request
Request Body:
{
"requesterAccessLevel": "Secret"
}
The Field Access API allows administrators to manage access levels for individual data fields in both UserData and ServiceData, ensuring secure, role-based data exposure.
GET /api/FieldAccess
POST /api/FieldAccess
Request Body:
{
"endpoint": "UserData",
"fieldName": "PhoneNum",
"accessLevel": "Public"
}
git clone https://github.com/killer6oose/API_Example.git
cd API_Example
dotnet restore
To enable the contact page, configure Azure AD credentials for Microsoft Graph in your app’s secrets:
dotnet user-secrets init
dotnet user-secrets set "AzureAd:ClientId" "your-client-id"
dotnet user-secrets set "AzureAd:TenantId" "your-tenant-id"
dotnet user-secrets set "AzureAd:ClientSecret" "your-client-secret"
dotnet user-secrets set "AzureAd:SenderEmail" "support@yourDomain.tld"
In your `appsettings.json`, configure the following URLs for home page links:
{
"Settings": {
"PublicUrl": "https://localhost:7189",
"SupportEmail": "support@yourDomain.tld"
}
}