API documentation

A map of the Heimdall API’s own documentation site: what each section covers and where to find it, from the endpoint reference to the data-protection documents.

The Heimdall API documents itself on its own site, artur-rios.github.io/heimdall-api. This site does not copy that material, because the API’s internals change with the API and the API’s site is rebuilt with it. This page is the map: every section of the API site, what it covers, and a link to it.

The API site’s top navigation has five entries: Documentation, Requirements, API Explorer, Test Coverage and GitHub. The Requirements entry opens the specification index. Test Coverage opens a coverage report that CI generates and does not commit.

Understanding and running the API

SectionWhat it covers
HomeThe API’s landing page, with an entry point for each of its themes.
DocumentationEverything needed to understand, run, test and extend the Heimdall API.
OverviewThe domain vocabulary (scopes, persons, roles, applications, permissions) and the rules that bind them.
Getting startedPrerequisites, configuration, migrations and running the API locally.
ArchitectureThe four layers, the CQRS mediator, the auditing decorator and the HTTP request pipeline.
Domain modelThe entities, their relationships and the deletion cascade rules, as class diagrams.
OperationsMigrations, start-up guards, health checks, metrics, logging, rate limiting, data retention and the integrations.
Environments and deploymentThe four environments and what each PostgreSQL has to allow.

Endpoints and the OpenAPI document

SectionWhat it covers
API referenceEvery endpoint, the role that may call it, and the use case it implements.
API ExplorerSwagger UI over the published OpenAPI document. It is read-only: it shows each operation’s request and response shapes but does not send requests.
OpenAPI documentThe OpenAPI document itself, as raw JSON.

The API has 61 operations, counted from its controllers; the committed OpenAPI document has the same 61. They fall into seven groups.

GroupRouteOperations
Authenticationapi/auth21
Scopesapi/scopes9
Personsapi/persons, api/scopes/{scopeId}/persons, api/scopes/{scopeId}/owners and related routes13
Applicationsapi/scopes/{scopeId}/applications6
Scope permissionsapi/scopes/{scopeId}/permissions6
Google usersapi/scopes/{scopeId}/google-users4
Healthapi/healthcheck2

Flows

The flows are sequence diagrams of the paths worth tracing end to end. The Flows index lists them all.

FlowWhat it covers
LoginUC-11: password authentication, the uniform rejection and the branch into a two-factor challenge.
Two-factor authenticationUC-36 to UC-40: setup, confirmation, the challenge-token round trip and recovery codes.
Google sign-inUC-24 to UC-29: enabling it per scope, sign-up and sign-in, and administering Google users.
Person onboardingUC-06, UC-14 and UC-15: creating a person, the verification email and replacing a lost link.
Password recoveryUC-12 and UC-13: an endpoint designed around what it must not reveal.
Scope permission claimsUC-31 to UC-35 and FR-AU-08: how a scope permission ends up inside a JWT.
Audit loggingNFR-09: one decorator, every write, no handler changes.

Specification

The Requirements index lists the specification documents. The same documents, with a one-line summary each, are also on the Repositories page, linked to GitHub. The API site publishes them in two groups.

Product and engineering documents

DocumentWhat it covers
Vision DocumentWhy Heimdall exists, who it serves, the stakeholders, the goals and what success means.
System Requirements DocumentThe functional and non-functional requirements, the data model, the endpoints, the authorization matrix and the deletion strategy.
Use Case Specification DocumentThe actor-facing use cases, with main flows and numbered alternative flows.
Technology Stack DocumentThe technologies, the libraries and their pinned versions.
Testing Specification DocumentThe unit and functional standards and the required coverage per use case.
Development Workflow DocumentA use case from backlog to merged: branch, issue status, testing gate and pull request.
Operations & Infrastructure DocumentHosting, the four environments, the technical foundation and the health-check feature.

Data-protection documents

Heimdall processes personal data, so its specification includes the documents that the LGPD and the GDPR call for.

DocumentWhat it covers
Data Protection DocumentWho controls what, on what basis, shared with whom and across which borders: the record of processing under LGPD Art. 37 and GDPR Art. 30.
Data Protection Impact AssessmentThe risks to data subjects and their mitigations, under GDPR Art. 35 and LGPD Art. 38.
Data Retention Schedule DocumentHow long each category of personal data is kept, why, and which periods the API enforces.
Privacy NoticeWhat Heimdall does with personal data, under LGPD Art. 9 and GDPR Art. 13 and 14.
Data Processing AgreementThe terms for processing a tenant’s users’ data, under LGPD Art. 39 and GDPR Art. 28.
Incident Response DocumentWhat counts as a personal data breach, who declares one, the clocks that start and who has to be told.
Threat Model DocumentThe threats by trust boundary, and the residual risk.

Changes and contributing

SectionWhat it covers
ChangelogThe notable changes in each release, rendered from the repository’s CHANGELOG.md.
ContributingBuild, tests and coverage, migrations, the OpenAPI document, branching and releasing, rendered from CONTRIBUTING.md.
Test coverage reportThe ReportGenerator coverage report, generated in CI.