Documentation

Review

Get problems by IDs

Returns problem content for given problem IDs. Used to fetch problem data for review cards.

ProductionStagingUAT
POSThttps://math.ankiren.com/api/me/review/problems

Request Body

Bắt buộc.

  • problemIds[string]Required
application/json
{
  "problemIds": [
    "prob-001",
    "prob-002",
    "prob-003"
  ]
}

Responses

200 · Problem data

  • problems[Problem]
    • idstringRequired
    • questionstringRequired
    • hintstring
    • solutionstringRequired
    • answerstringRequired
    • answerType"numeric" | "multiple-choice" | "text"

      Type of answer expected for a problem

    • choices[object]
    • hints[string]
    • difficulty"easy" | "medium" | "hard"

      Problem difficulty level

    • distractors[object]
    • acceptedAnswers[string]
    • problemNumberinteger
    • slugstring
application/json
{
  "problems": [
    {
      "id": "string",
      "question": "string",
      "hint": "string",
      "solution": "string",
      "answer": "string",
      "answerType": "numeric",
      "choices": [
        {}
      ],
      "hints": [
        "string"
      ],
      "difficulty": "easy",
      "distractors": [
        {}
      ],
      "acceptedAnswers": [
        "string"
      ],
      "problemNumber": 0,
      "slug": "string"
    }
  ]
}

Sample Code

Đổi ngôn ngữ ở ô Language trên thanh Documentation.

cURL
curl -X POST 'https://math.ankiren.com/api/me/review/problems' \
  -H 'Authorization: Bearer <token>' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "problemIds": [
    "prob-001",
    "prob-002",
    "prob-003"
  ]
}'