Skip to content

ADR 10 ‐ Questions API structure

Teresa González edited this page Apr 28, 2024 · 1 revision

Status

  • Proposed
  • Accepted
  • Superseded

Context

We have an API for external users to be able to access our question generation service. Due to the structure of the question generation itself, we had to make decision on what would be part of the API.

Decision

We have chosen to provide only two different urls. Both of them are filters (by language or cathegory). We have decided this because the question generation service is autonomous when it comes to creating or removing questions from the database. When there are few questions in the database, it creates more in an asynchronus way. When there are many, each question is taken from the database is also remove from it. That way we prevent it to repeat questions.

Consequences

  • Benefits:

    • Autonomy: The user does not have to worry about when and how are questions created or removed.
    • No learning curve: A request needs only a language, and specifying category is optional so it is very easy to use and understand.
  • Trade-offs:

    • Customization: The user is not able to customize a new question.

Compliance

For these reasons, there are only two options regarding questions API.

Notes

  • Original Author: @uo288347
  • Approval date: 26/04/2024
  • Approved by: (link to meeting minute)