Skip to content

feat: more API fields+filtering; drop RfcAuthor.email field#10432

Merged
jennifer-richards merged 15 commits intoietf-tools:mainfrom
jennifer-richards:red-doclist-api-tweak
Feb 20, 2026
Merged

feat: more API fields+filtering; drop RfcAuthor.email field#10432
jennifer-richards merged 15 commits intoietf-tools:mainfrom
jennifer-richards:red-doclist-api-tweak

Conversation

@jennifer-richards
Copy link
Copy Markdown
Member

Drops the email field from RfcAuthor, replacing it with a passthrough to person when one is attached.

Adds fields to the redDocList() API response

  • shepherd email
  • ad email for RFC
  • ad email for the originating draft
  • ad emails for the area
  • list email for the group

Adds filtering by RFC numbers. In the URL query string this looks like ?number=1,2,3 but the API client handles that detail. The call would be

red_doc_list(number=[1,2,3])

The SQL queries that result from the changes have not been optimized carefully so this may slow the API down a bit. It does not seem obviously problematic in dev so far, but we can revisit that if needed.

As an example, for the request

curl -H 'X-Api-Key: <token>' http://localhost:8000/api/red/doc/\?number\=7991,8235

the return value is

{
  "count": 2,
  "next": null,
  "previous": null,
  "results": [
    {
      "number": 8235,
      "title": "Schnorr Non-interactive Zero-Knowledge Proof",
      "published": "2017-09-05",
      "status": {
        "slug": "inf",
        "name": "informational"
      },
      "pages": 13,
      "authors": [
        {
          "titlepage_name": "Feng Hao",
          "is_editor": false,
          "person": 116619,
          "email": "haofeng66@gmail.com",
          "affiliation": "Newcastle University",
          "country": "United Kingdom",
          "datatracker_person_path": "/person/Feng%20Hao"
        }
      ],
      "group": {
        "acronym": "none",
        "name": "Individual Submissions",
        "type": "individ",
        "list_email": ""
      },
      "area": null,
      "stream": {
        "slug": "ise",
        "name": "ISE",
        "desc": "Independent Submission"
      },
      "ad": null,
      "group_list_email": "",
      "identifiers": [
        {
          "type": "doi",
          "value": "10.17487/RFC8235"
        }
      ],
      "obsoletes": [],
      "obsoleted_by": [],
      "updates": [],
      "updated_by": [],
      "subseries": [],
      "draft": {
        "id": 19850,
        "name": "draft-hao-schnorr",
        "title": "Schnorr Non-interactive Zero-Knowledge Proof",
        "shepherd": {
          "email": "Eliot Lear <rfc-ise@rfc-editor.org>"
        },
        "ad": null
      },
      "abstract": "This document describes the Schnorr non-interactive zero-knowledge (NIZK) proof, a non-interactive variant of the three-pass Schnorr identification scheme.  The Schnorr NIZK proof allows one to prove the knowledge of a discrete logarithm without leaking any information about its value.  It can serve as a useful building block for many cryptographic protocols to ensure that participants follow the protocol specification honestly.  This document specifies the Schnorr NIZK proof in both the finite field and the elliptic curve settings.",
      "formats": [
        {
          "fmt": "txt",
          "name": "txt/rfc8235.txt"
        },
        {
          "fmt": "html",
          "name": "html/rfc8235.html"
        },
        {
          "fmt": "json",
          "name": "json/rfc8235.json"
        }
      ],
      "keywords": [
        "keyword"
      ],
      "has_errata": true
    },
    {
      "number": 7991,
      "title": "The \"xml2rfc\" Version 3 Vocabulary",
      "published": "2016-12-16",
      "status": {
        "slug": "inf",
        "name": "informational"
      },
      "pages": 151,
      "authors": [
        {
          "titlepage_name": "Paul Hoffman",
          "is_editor": false,
          "person": 10083,
          "email": "paul.hoffman@icann.org",
          "affiliation": "ICANN",
          "country": "",
          "datatracker_person_path": "/person/Paul%20E.%20Hoffman"
        }
      ],
      "group": {
        "acronym": "iab",
        "name": "Internet Architecture Board",
        "type": "ietf",
        "list_email": "iab@iab.org"
      },
      "area": {
        "acronym": "ietf",
        "name": "IETF",
        "type": "ietf",
        "ads": []
      },
      "stream": {
        "slug": "iab",
        "name": "IAB",
        "desc": "Internet Architecture Board (IAB)"
      },
      "ad": null,
      "group_list_email": "iab@iab.org",
      "identifiers": [
        {
          "type": "doi",
          "value": "10.17487/RFC7991"
        }
      ],
      "obsoletes": [
        {
          "id": 129572,
          "number": 7749,
          "title": "The \"xml2rfc\" Version 2 Vocabulary"
        }
      ],
      "obsoleted_by": [],
      "updates": [],
      "updated_by": [
        {
          "id": 153627,
          "number": 9920,
          "title": "RFC Editor Model (Version 3)"
        }
      ],
      "subseries": [],
      "draft": {
        "id": 64140,
        "name": "draft-iab-xml2rfc",
        "title": "The \"xml2rfc\" Version 3 Vocabulary",
        "shepherd": null,
        "ad": null
      },
      "abstract": "This document defines the \"xml2rfc\" version 3 vocabulary: an XML-based language used for writing RFCs and Internet-Drafts.  It is heavily derived from the version 2 vocabulary that is also under discussion.  This document obsoletes the v2 grammar described in RFC 7749.",
      "formats": [
        {
          "fmt": "txt",
          "name": "txt/rfc7991.txt"
        },
        {
          "fmt": "html",
          "name": "html/rfc7991.html"
        },
        {
          "fmt": "json",
          "name": "json/rfc7991.json"
        }
      ],
      "keywords": [
        "keyword"
      ],
      "has_errata": true
    }
  ]
}

@codecov
Copy link
Copy Markdown

codecov bot commented Feb 20, 2026

Codecov Report

❌ Patch coverage is 75.00000% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.35%. Comparing base (8005a8b) to head (0dbf6e1).
⚠️ Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
ietf/doc/serializers.py 61.11% 7 Missing ⚠️
ietf/group/serializers.py 81.25% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #10432      +/-   ##
==========================================
- Coverage   88.36%   88.35%   -0.02%     
==========================================
  Files         325      325              
  Lines       43653    43683      +30     
==========================================
+ Hits        38576    38594      +18     
- Misses       5077     5089      +12     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

rjsparks
rjsparks previously approved these changes Feb 20, 2026
Also falls back to current primary email for ad/shepherd if the email on
record is inactive.
@jennifer-richards jennifer-richards merged commit c4be631 into ietf-tools:main Feb 20, 2026
8 checks passed
@jennifer-richards jennifer-richards deleted the red-doclist-api-tweak branch February 20, 2026 19:26
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 24, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants