# /get-quiz

**Input Parameters**

| Parameter | Type   | Description                         |
| --------- | ------ | ----------------------------------- |
| quizId    | String | The unique identifier for the quiz. |

**Example Request**

```javascript
// Example to get quiz metadata
fetch("https://api.arlinear.com/functions/v1/get-quiz", {
  method: "POST",
  headers: {
    Authorization: "<Your API Key>",
  },
  body: JSON.stringify({
    quizId: "ba777045-7033-4701-b17b-da9e90dcd41e",
  }),
});
```

**Return Value**

* `quizId`: A unique identifier for the generated quiz.
* `title`: The title of the quiz.
* `questions`: The questions in the quiz.

```json
{
  "quizId": "ba777045-7033-4701-b17b-da9e90dcd41e",
  "title": "Math Quiz",
  "questions": [
            {
                "id": "d93bdcaf-0490-4cb7-af55-bfcb07c33332",
                "type": "mc",
                "value": "What is the result of 5 + 2 * 3?",
                "choices": [
                    {
                        "value": " 11",
                        "isCorrect": true,
                        "type": "choice"
                    },
                    {
                        "value": " 14",
                        "isCorrect": false,
                        "type": "choice"
                    },
                    {
                        "value": " 9",
                        "isCorrect": false,
                        "type": "choice"
                    }
                ]
            },
            {
                "id": "d93bdcaf-0490-4cb7-af55-bfcb07c33332",
                "type": "short",
                "value": "Solve for x: 3x + 2 = 8",
                "gradingCriteria": "Grading Criteria: \"This quiz is for 1st graders. They should be able to perform simple order of operations.\""
            }
    ]
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://arlinear.gitbook.io/documentation/api/get-quiz.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
