GMI · TECHNOLOGY OBSERVATORY // ALL SYSTEMS NOMINAL
ENGINEERED BY LEOPARD DATA

Azure Functions Layer

Serverless API layer providing HTTP triggers and cloud-based business logic.

REQUEST PIPELINE
rendering diagram…
flowchart LR
    CLIENT[Client<br/>Blazor - MAUI]:::app
    MW1{Rate Limiter<br/>Middleware}:::sec
    MW2{Auth<br/>Middleware}:::sec
    FN[Azure Function<br/>HTTP Trigger]:::app
    SVC[Gmi.Services<br/>Business Logic]:::svc
    DB[(MySQL)]:::data
    BLOB[(Blob Storage)]:::data
    EXT[External APIs<br/>Stripe - FMP]:::ext

    CLIENT -->|HTTPS request| MW1
    MW1 -->|within limits| MW2
    MW2 -->|token valid| FN
    FN -->|invokes| SVC
    SVC -->|EF Core| DB
    SVC -->|file ops| BLOB
    SVC -->|integration| EXT
    MW1 -->|429 Too Many Requests| CLIENT
    MW2 -->|401 Unauthorized| CLIENT

    classDef app fill:#1f2630,stroke:#C0894E,color:#F3EFE8;
    classDef svc fill:#241c14,stroke:#E2B583,color:#F3EFE8;
    classDef data fill:#22201a,stroke:#C0894E,color:#EBD3AE;
    classDef ext fill:#1b1f27,stroke:#5A616B,color:#C4C0B8;
    classDef sec fill:#1d2733,stroke:#5cc8e0,color:#eafaff;
How an inbound HTTP request traverses the Azure Functions middleware pipeline to the service layer.

Gmi.Api.AzureFunctions

The serverless API layer built on Azure Functions provides:

  • RESTful API endpoints
  • Authentication & authorization
  • Data validation
  • Business logic processing
  • External service integration
  • Scalable execution

API Endpoints

Complete list of 312 HTTP endpoints organized by functional area

Account Management (17 endpoints)
POST/accountsCreate new account
POST/accounts/validate-emailValidate email address
POST/accounts/{accountId}/resend-email-validationResend email validation
PUT/accountsUpdate account details
PATCH/accounts/{accountId}/enableEnable/disable account
POST/accounts/searchSearch accounts
GET/accounts/pagedGet paginated accounts
PATCH/accounts/{accountId}/validateValidate account for use
PATCH/accounts/{accountId}/set-email-validatedSet email as validated
PATCH/accounts/{accountId}/unvalidateRemove account validation
PATCH/accounts/{accountId}/complete-web-onboardingComplete web onboarding
PATCH/accounts/{accountId}/reset-web-onboardingReset web onboarding
PATCH/accounts/{accountId}/complete-mobile-onboardingComplete mobile onboarding
PATCH/accounts/{accountId}/reset-mobile-onboardingReset mobile onboarding
GET/accounts/{accountId}Get account details
GET/accounts/external/{externalKey}Get account by external key
PATCH/accounts/{id}/set-free-statusSet free account status
Contact Management - Email & SMS (6 endpoints)
GET/accounts/{accountId}/emailsGet account email addresses
POST/accounts/{accountId}/emailsAdd email to account
DELETE/accounts/emails/{emailId}Remove email address
GET/accounts/{accountId}/smsGet SMS numbers
POST/accounts/{accountId}/smsAdd SMS number
DELETE/accounts/sms/{smsId}Remove SMS number
Billing & Charges (11 endpoints)
POST/accounts/{accountId}/creditsIssue credit for account
POST/accounts/{accountId}/chargesRecord account charge
GET/accounts/{accountId}/charges/countGet charge count with date span
GET/accounts/{accountId}/chargesGet account charges (paged)
GET/charges/{chargeId}Get charge by ID
GET/accounts/{accountId}/charges/uninvoicedGet uninvoiced charges
GET/accounts/{accountId}/billing/dashboardBilling dashboard
POST/accounts/{accountId}/creditcardsAdd credit card
DELETE/creditcards/{creditCardId}Remove credit card
GET/accounts/{accountId}/creditcardsGet credit cards
PATCH/creditcards/{creditCardId}/set-defaultSet default card
File Management (7 endpoints)
GET/folders/{folderId}/filesGet files in folder
DELETE/files/{fileId}Delete file
GET/files/{fileId}/downloadDownload file
PATCH/files/{fileId}/renameRename file
PATCH/files/{fileId}/colorChange file color
POST/accounts/{accountId}/folders/{folderId}/filesUpload file to folder
GET/files/{fileId}/propertiesGet file properties
Folder Management (16 endpoints)
GET/accounts/{accountId}/foldersGet account folders
POST/accounts/{accountId}/foldersCreate folder for account
GET/folders/{parentFolderId}/subfoldersGet subfolders
GET/folders/{folderId}Get folder by ID
GET/foldersGet folders by parent
GET/folders/{currentFolderId}/nextGet next folder in order
GET/folders/{currentFolderId}/previousGet previous folder
PATCH/folders/{folderId}/movetorootMove folder to root
PATCH/folders/{folderId}/moveupMove folder up in order
PATCH/folders/{folderId}/movedownMove folder down
PATCH/folders/{folderId}/renameRename folder
PATCH/folders/{folderId}/colorChange folder color
GET/folders/{folderId}/sizeGet folder size
GET/folders/{folderId}/propertiesGet folder properties
DELETE/folders/{folderId}Delete folder and contents
GET/accounts/{accountId}/folder-treeGet folder tree with files
Download Management (3 endpoints)
POST/accounts/{accountId}/downloadsRequest download
GET/accounts/{accountId}/downloadsGet downloads
DELETE/accounts/{accountId}/downloads/{downloadId}Delete download
Job Management (12 endpoints)
POST/jobsCreate new job
GET/accounts/{accountId}/jobsGet jobs by account and status
GET/jobs/{jobId}Get job by ID
GET/jobstatustypes/{jobStatusTypeId}Get job status type
GET/jobstatustypesGet all job status types
POST/jobs/{jobId}/symbollistsAdd symbol list to job
DELETE/jobs/symbollists/{jobSymbolListId}Remove symbol list from job
GET/jobs/{jobId}/symbollistsGet job symbol lists
GET/jobs/{jobId}/charges/{accountId}Get job charge details
GET/jobs/{jobId}/folderGet job top folder
GET/accounts/{accountId}/jobs/filteredGet filtered jobs
GET/accounts/{accountId}/jobs/countGet job count
Account Folders (3 endpoints)
GET/accounts/{accountId}/account-foldersGet account folders
POST/accounts/{accountId}/account-foldersAdd folder to account
DELETE/account-folders/{accountFolderId}Remove folder from account
Job Notifications (7 endpoints)
GET/jobs/{jobId}/notifications/emailsGet notification emails for job
GET/jobs/{jobId}/notifications/smsGet notification SMS for job
POST/job-notifications/{jobNotificationSettingsId}/emailsAdd email to job notification
DELETE/job-notifications/{jobNotificationSettingsId}/emails/{accountEmailAddressId}Remove email from job notification
POST/job-notifications/{jobNotificationSettingsId}/smsAdd SMS to job notification
DELETE/job-notifications/{jobNotificationSettingsId}/sms/{accountSmsNumberId}Remove SMS from job notification
POST/jobs/{jobId}/notifications/configureConfigure job notification settings
Payments (1 endpoint)
POST/accounts/{accountId}/paymentsRecord payment for account
Position Reports (9 endpoints)
GET/accounts/{accountId}/position-reportsGet position reports for account
POST/accounts/{accountId}/position-reportsCreate position report
PUT/position-reports/{positionReportId}Update position report
DELETE/position-reports/{positionReportId}Delete position report
GET/position-reports/{positionReportId}/itemsGet position report items
POST/position-reports/{positionReportId}/itemsAdd position report item
DELETE/position-report-items/{positionReportListItemId}Delete position report item
PUT/position-report-itemsUpdate position report item
POST/accounts/{accountId}/position-reports/upload-csvUpload CSV position report
Report Generation Schedules (4 endpoints)
POST/report-generation-schedulesCreate report generation schedule
GET/accounts/{accountId}/report-generation-schedulesGet schedules for account
PUT/report-generation-schedulesUpdate report generation schedule
DELETE/report-generation-schedules/{scheduleId}Delete report generation schedule
Symbol Lists (8 endpoints)
GET/accounts/{accountId}/symbol-listsGet symbol lists by account
GET/symbol-lists/{symbolListId}Get symbol list
POST/accounts/{accountId}/symbol-listsCreate symbol list for account
PUT/symbol-lists/{symbolListId}Update symbol list
POST/symbol-listsCreate symbol list
PATCH/symbol-lists/{symbolListId}/renameRename symbol list
DELETE/symbol-lists/{symbolListId}Delete symbol list
PATCH/symbol-lists/{symbolListId}/descriptionUpdate symbol list description
Symbol List Items (4 endpoints)
GET/symbol-lists/{symbolListId}/itemsGet symbol list items
POST/symbol-lists/{symbolListId}/itemsAdd symbol list item
PUT/symbol-list-itemsUpdate symbol list item
DELETE/symbol-list-items/{symbolListItemId}Delete symbol list item
Symbol List Templates (13 endpoints)
POST/symbol-list-templates/searchSearch symbol list templates
GET/symbol-list-templates/detail/{templateId}Get template detail
GET/symbol-list-templates/categoriesGet template categories
POST/accounts/{accountId}/symbol-list-templatesPublish community template
POST/accounts/{accountId}/symbol-lists/from-templateCreate symbol list from template
GET/accounts/{accountId}/symbol-list-templatesGet account templates
DELETE/symbol-list-templates/detail/{templateId}Delete symbol list template
POST/manage/symbol-list-templatesAdmin create template
PUT/manage/symbol-list-templates/{templateId}Admin update template
GET/manage/symbol-list-templatesAdmin get all templates
PATCH/manage/symbol-list-templates/{templateId}/activateAdmin activate template
PATCH/manage/symbol-list-templates/{templateId}/deactivateAdmin deactivate template
DELETE/manage/symbol-list-templates/{templateId}Admin delete template
Messaging - Email & SMS Queue (3 endpoints)
POST/messaging/emailsEnqueue email to send
PATCH/messaging/emails/{emailToSendId}/sentMark email as sent
POST/messaging/smsEnqueue SMS to send
Admin Users (19 endpoints)
GET/management/users/meCheck my admin status
GET/management/users/{adminUserId}Get admin user by ID
GET/management/users/entra/{entraUserId}Get admin user by Entra ID
GET/management/users/email/{email}Get admin user by email
GET/management/users/activeGet all active admin users
GET/management/users/role/{role}Get admin users by role
GET/management/usersGet admin users (paged)
POST/management/users/bootstrapBootstrap admin user
POST/management/usersCreate admin user
PUT/management/users/{adminUserId}Update admin user
PATCH/management/users/{adminUserId}/deactivateDeactivate admin user
PATCH/management/users/{adminUserId}/activateActivate admin user
PATCH/management/users/{adminUserId}/roleUpdate admin user role
PATCH/management/users/{adminUserId}/lastloginUpdate admin user last login
PATCH/management/users/entra/{entraUserId}/lastloginUpdate last login by Entra ID
GET/management/users/count/activeGet active admin user count
GET/management/users/count/role/{role}Get admin user count by role
POST/management/users/{adminUserId}/validate-permissionsValidate admin permissions
DELETE/management/users/{adminUserId}Delete admin user
Admin Notification Emails (5 endpoints)
GET/management/notification-emailsGet all notification emails
GET/management/notification-emails/{id}Get notification email by ID
POST/management/notification-emailsCreate notification email
PUT/management/notification-emails/{id}Update notification email
DELETE/management/notification-emails/{id}Delete notification email
Invoicing (4 endpoints)
GET/accounts/{accountId}/invoicesGet account invoices
GET/accounts/{accountId}/balanceGet current account balance
GET/invoices/{invoiceId}Get invoice with charges
GET/invoices/{invoiceId}/charges/downloadDownload invoice charges
Stripe Integration (2 endpoints)
POST/accounts/{accountId}/stripe/payment-methodsCreate Stripe payment method
POST/stripe/webhookStripe webhook handler
Dashboard & Statistics (15 endpoints)
GET/dashboard/systemGet system dashboard
GET/dashboard/statsGet system stats
GET/accounts/{accountId}/dashboardGet account dashboard
GET/dashboard/metrics/accounts/totalTotal accounts count
GET/dashboard/metrics/accounts/activeActive accounts count
GET/dashboard/metrics/accounts/validation-pendingValidation pending count
GET/dashboard/metrics/jobs/totalTotal jobs count
GET/dashboard/metrics/jobs/in-progressJobs in progress count
GET/dashboard/metrics/jobs/completed-todayCompleted jobs today count
GET/dashboard/metrics/revenue/totalTotal revenue
GET/dashboard/metrics/revenue/this-monthRevenue this month
GET/dashboard/metrics/storage/totalTotal storage used
GET/dashboard/metrics/revenue/monthlyMonthly revenue breakdown
GET/dashboard/metrics/accounts/growthAccount growth metrics
GET/dashboard/metrics/jobs/status-breakdownJob status breakdown
Coupons (1 endpoint)
GET/accounts/{accountId}/coupons/usedCheck if account used any coupon
Report Generation (3 endpoints)
POST/accounts/{accountId}/reports/estimateGet report cost estimate
POST/accounts/{accountId}/reports/generateGenerate report
GET/reports/traffic-patternGet report queue status with ETAs (Report Traffic Pattern)
Activity Logging (3 endpoints)
POST/accounts/{accountId}/activityLog activity
POST/accounts/{accountId}/activity/batchLog activity batch
GET/accounts/{accountId}/activityGet activity log
Health & System Monitoring (5 endpoints)
GET/healthHealth check
GET/readyReadiness probe
GET/management/system-healthGet system health data
GET/management/financials/dashboardPlatform financial dashboard
GET/management/financials/card-expirationsCard expiration summary
Admin Queue & Activity Log (5 endpoints)
GET/management/email-queueGet email queue
GET/management/sms-queueGet SMS queue
GET/management/activity-log/statsGet activity log stats
GET/management/activity-logGet admin activity log
GET/management/activity-log/top-accountsGet top accounts by activity
Claude AI Analysis (8 endpoints)
POST/claude-analysis/estimateEstimate Claude analysis cost
POST/claude-analysis/submitSubmit Claude analysis job
GET/claude-analysis/jobs/{accountId}Get Claude analysis jobs
GET/claude-analysis/job/{jobId}Get Claude analysis job detail
POST/claude-analysis/cancel/{jobId}Cancel Claude analysis job
POST/claude-analysis/jobs/{jobId}/dismissDismiss Claude analysis job
POST/claude-analysis/console/estimateEstimate Claude console question cost
POST/claude-analysis/console/askAsk Claude console question
Report Comparison (8 endpoints)
GET/report-comparison/groups/{accountId}Get comparison groups
GET/report-comparison/runs/{accountId}/{groupKey}Get comparison runs
POST/report-comparison/estimateEstimate comparison cost
POST/report-comparison/submitSubmit comparison job
GET/report-comparison/jobs/{accountId}Get comparison jobs
GET/report-comparison/job/{jobId}Get comparison job detail
POST/report-comparison/cancel/{jobId}Cancel comparison job
POST/report-comparison/dismiss/{jobId}Dismiss comparison job
ETF Holdings (7 endpoints)
GET/etf-holdings/{etfSymbol}Lookup ETF holdings
POST/accounts/{accountId}/symbol-lists/from-etfCreate symbol list from ETF
POST/accounts/{accountId}/symbol-list-templates/from-etfPublish template from ETF
POST/manage/etf-templates/createAdmin create approved ETF template
GET/manage/etf-templates/{templateId}/refresh-preview/{etfSymbol}Admin preview ETF template refresh
POST/manage/etf-templates/{templateId}/refresh-from-fmpAdmin apply ETF template refresh
POST/manage/etf-templates/seed-and-syncAdmin seed and sync approved templates
Billing Processing (3 endpoints)
GET/management/billing/previewGet billing preview
POST/management/billing/chargeProcess billing charge
POST/management/billing/charge-accountProcess billing charge for account
Critical Error Logs (3 endpoints)
GET/management/critical-errors/statsGet critical error log stats
GET/management/critical-errorsGet critical error logs
POST/management/critical-errors/{errorLogId}/resolveResolve critical error
Report Dashboard (3 endpoints)
GET/accounts/{accountId}/jobs/{jobId}/dashboardGet report dashboard summary
GET/accounts/{accountId}/jobs/{jobId}/dashboard/{symbol}Get report dashboard symbol detail
POST/accounts/{accountId}/jobs/{jobId}/dashboard/ask-claudeAsk Claude about dashboard
Support Requests (6 endpoints)
POST/accounts/{accountId}/support-requestsCreate support request
GET/accounts/{accountId}/support-requestsGet support requests by account
GET/support-requestsGet all support requests (admin)
GET/support-requests/{id}Get support request by ID
POST/support-requests/{id}/respondRespond to support request
PUT/support-requests/{id}/statusUpdate support request status
Feature Requests (5 endpoints)
POST/accounts/{accountId}/feature-requestsCreate feature request
GET/accounts/{accountId}/feature-requestsGet feature requests by account
GET/feature-requestsGet all feature requests (admin)
GET/feature-requests/{id}Get feature request by ID
PUT/feature-requests/{id}/statusUpdate feature request status
Bug Reports (6 endpoints)
POST/accounts/{accountId}/bug-reportsCreate bug report (authenticated)
POST/bug-reportsCreate bug report (public)
GET/accounts/{accountId}/bug-reportsGet bug reports by account
GET/bug-reportsGet all bug reports (admin)
GET/bug-reports/{id}Get bug report by ID
PUT/bug-reports/{id}/statusUpdate bug report status
Platform Feedback (4 endpoints)
POST/platform-feedbackCreate feedback (public)
POST/accounts/{accountId}/platform-feedbackCreate feedback (authenticated)
GET/platform-feedbackGet all feedback (admin)
GET/platform-feedback/{id}Get feedback by ID
Admin Queue Counts (1 endpoint)
GET/admin/queue-countsGet admin notification bar counts
Knowledge Base (10 endpoints)
GET/knowledge-baseGet published articles
GET/knowledge-base/allGet all articles (admin)
GET/knowledge-base/{id}Get article by ID
GET/knowledge-base/slug/{slug}Get article by slug
GET/knowledge-base/categoriesGet categories
GET/knowledge-base/searchSearch articles
POST/knowledge-baseCreate article
PUT/knowledge-base/{id}Update article
DELETE/knowledge-base/{id}Delete article
GET/knowledge-baseGet published (with category filter)
Announcements (6 endpoints)
GET/announcements/activeGet active announcements
GET/announcementsGet all announcements (admin)
GET/announcements/{id}Get announcement by ID
POST/announcementsCreate announcement
PUT/announcements/{id}Update announcement
DELETE/announcements/{id}Delete announcement
Changelog (6 endpoints)
GET/changelog/publishedGet published changelog entries
GET/changelogGet all entries (admin)
GET/changelog/{id}Get entry by ID
POST/changelogCreate entry
PUT/changelog/{id}Update entry
DELETE/changelog/{id}Delete entry
Maintenance Windows (6 endpoints)
GET/maintenance-windows/activeGet active maintenance window
GET/maintenance-windows/upcomingGet upcoming maintenance windows
GET/maintenance-windowsGet all windows (admin)
POST/maintenance-windowsCreate maintenance window
PUT/maintenance-windows/{id}Update maintenance window
DELETE/maintenance-windows/{id}Delete maintenance window
Email Preferences (2 endpoints)
GET/accounts/{accountId}/email-preferencesGet email preferences
PUT/accounts/{accountId}/email-preferencesUpdate email preferences
Data Export (1 endpoint)
GET/accounts/{accountId}/exportExport account data as JSON
Analytics - Cost & Margin (3 endpoints)
GET/analytics/costsCost & margin analytics
POST/analytics/expensesAdd operational expense
DELETE/analytics/expenses/{id}Delete operational expense
Blog (8 endpoints)
GET/blog/publishedGet published blog posts
GET/blogGet all posts (admin)
GET/blog/{id}Get post by ID
GET/blog/slug/{slug}Get post by slug
POST/blogCreate blog post
PUT/blog/{id}Update blog post
DELETE/blog/{id}Delete blog post
POST/blog/{id}/viewIncrement view count

Total: 312 HTTP endpoints across 45 functional areas serving the complete Grade My Investments platform

Function Architecture

Runtime & Hosting
  • Runtime: .NET 10 Isolated
  • Hosting: Azure Functions v4
  • Plan: Consumption/Premium
  • Triggers: HTTP only
Dependencies
  • Gmi.DataAccess
  • Gmi.Services
  • Gmi.ClassLibrary
  • Entity Framework Core

Security & Authentication

Authentication Methods
  • Azure AD integration
  • JWT token validation
  • Role-based access
Security Features
  • HTTPS enforcement
  • Input validation
  • Data sanitization
Deployment
  • Azure DevOps CI/CD
  • Staging slots
  • Blue-green deployment
  • Automated testing
Monitoring
  • Application Insights
  • Performance metrics
  • Error tracking
  • Health checks
Performance
  • Cold start optimization
  • Connection pooling
  • Async operations
  • Caching strategies
  • Auto-scaling