Skip to content

Passport bulk status check: GET /api/passports/status?ids=id1,id2,id3 #124

Description

@leocagli

Context

Services that need to validate multiple agents at once (e.g. a quest system checking 10 participants) must currently make one HTTP call per passport. A bulk endpoint reduces round-trips dramatically.

What to implement

Route: GET /api/passports/status

Query param: ids — comma-separated list of passport IDs (max 50)

Response:

{
  "results": [
    { "id": "passport-abc", "status": "active", "agentId": "bot-1" },
    { "id": "passport-xyz", "status": "revoked", "agentId": "bot-2" },
    { "id": "passport-missing", "status": null, "error": "not_found" }
  ]
}

Missing IDs return {status: null, error: "not_found"} — not a 404 for the whole request.

Limits

  • Max 50 IDs per request; return 400 if exceeded
  • Empty ids param returns 400

Acceptance criteria

  • GET /api/passports/status?ids=a,b,c returns one entry per ID
  • Missing IDs appear with error: "not_found" rather than failing the request
  • Exceeding 50 IDs returns 400 with a clear message
  • Unit test: mix of active, revoked, missing IDs in one request

🎁 Evidencia visual = reward extra

  • Si tu PR incluye video demo o capturas de pantalla mostrando la funcionalidad pedida funcionando end-to-end, va a ser considerado para rewards de GrantFox en esta issue. No es obligatorio, pero suma mucho para la evaluación.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions