User & Service Data API Application

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.

Live Demo

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.

Table of Contents

Features

API Overview

User Data API

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.

Service Data API

The Service Data API manages and provides access to service-related information, secured with role-based access controls for each field.

Field Access API

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.

Getting Started

Prerequisites

Installation

  1. Clone the Repository
    
    git clone https://github.com/killer6oose/API_Example.git
                
  2. Navigate to the Project Directory
    
    cd API_Example
                
  3. Restore Dependencies (if required by your IDE)
    
    dotnet restore
                

Configuration

App Settings for Contact Page

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"
    

App Settings for URLs

In your `appsettings.json`, configure the following URLs for home page links:


{
  "Settings": {
    "PublicUrl": "https://localhost:7189",
    "SupportEmail": "support@yourDomain.tld"
  }
}