This set of documents describes the Django models that make up the IETF Datatracker database. It is intended as an orientation for developers new to the codebase and for data researchers who want to query the database directly.
The datatracker source lives at https://github.com/ietf-tools/datatracker. The REST API is available at https://datatracker.ietf.org/api/v1/.
The datatracker is a Django project. Each logical area of functionality lives in a Django app
under ietf/. The apps covered here are:
| App | Purpose |
|---|---|
| person | People, email addresses, and API keys |
| doc | Documents — drafts, RFCs, charters, meeting materials, and more |
| group | Working groups, areas, directorates, teams, and their roles |
| meeting | IETF meetings, sessions, scheduling, and proceedings |
| review | Document review teams, requests, and assignments |
| supporting | Stats, IPR disclosures, liaison statements, and NomCom |
Supporting apps whose models are not documented in depth here include:
community— personal and group document watch listsdbtemplate— database-stored Django/RST templatesiesg— telechat dates and agenda itemsmailtrigger— rules and recipient sets for automated emailmessage— outbound email messages and send queuessubmit— Internet-Draft submission workflowname— enumeration tables (slug/name pairs) used as foreign keys throughout
Almost every foreign key that looks like a "type" or "state" field points to a row in a
small enumeration table that subclasses NameModel from ietf/name/models.py. These
tables have the shape:
slug (PK) | name | desc | used | order
Examples: DocTypeName, GroupTypeName, RoleName, StreamName, StateType, ReviewResultName.
When you see a field like type_id or state_id on a model, it is almost certainly a FK to
one of these tables.
A local development environment gives you a Django shell:
$ ./ietf/manage.py shellOr via the REST API:
$ curl "https://datatracker.ietf.org/api/v1/doc/document/?format=json&limit=1" | jq- Primary keys are auto-increment integers unless otherwise noted.
NameModelsubclasses use theslugas PK. - Historical records — several core models (Person, Email, ReviewRequest, etc.) attach
simple_history.models.HistoricalRecordsfor full audit trails. - DocEvent audit trail — document history is primarily tracked through append-only
DocEventrows; see document.md. - Soft references by name —
Document.nameis a unique, immutable string key used in URLs and inter-model references (e.g.RelatedDocument.targetis a FK toDocument). There is no longer aDocAliasindirection layer; see document.md.