A novel's quiz, one page. The answer is withheld unless asked for.
const url = 'https://api.utmelab.com/api/v1/novels/example/questions';const options = {method: 'GET', headers: {'X-API-Key': '<X-API-Key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.utmelab.com/api/v1/novels/example/questions \ --header 'X-API-Key: <X-API-Key>'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Novel id, e.g. lekki.
Query Parameters
Section titled “Query Parameters”Drill one chapter.
Include the answer and the working. Default: false.
1-based page. Default: 1.
Rows per page, clamped. Default: 50, cap: 200.
Responses
Section titled “Responses”One page of a collection in the shape every paged endpoint serves.
The envelope lives here, once, so a new paged endpoint cannot
re-derive the counts: total_pages comes from total_records and
per_page through [Page::new], never from the call site.
The collection field is questions because both surfaces that page
today page questions; a future non-question page renames it there.
object
One novel quiz row as served. novel_id is stamped by the caller.
The stored row does not carry it.
object
Why the answer is what it is: teaser, working, and the distractor that catches people.
object
Plain text plus offset marks. text stays searchable as characters;
structure rides in inline as Unicode-scalar offsets, never bytes.
object
One offset mark. Serialised flat with an adjacent kind tag, e.g.
{"start":24,"len":6,"kind":"underline"}.
object
object
object
object
object
object
object
object
Where the figure renders relative to the stem. Data, never inferred.
Length in Unicode scalar values. Zero for an image anchor, which marks an attachment point rather than a span.
Offset in Unicode scalar values from the start of text.
Plain text plus offset marks. text stays searchable as characters;
structure rides in inline as Unicode-scalar offsets, never bytes.
object
One offset mark. Serialised flat with an adjacent kind tag, e.g.
{"start":24,"len":6,"kind":"underline"}.
object
object
object
object
object
object
object
object
Where the figure renders relative to the stem. Data, never inferred.
Length in Unicode scalar values. Zero for an image anchor, which marks an attachment point rather than a span.
Offset in Unicode scalar values from the start of text.
Plain text plus offset marks. text stays searchable as characters;
structure rides in inline as Unicode-scalar offsets, never bytes.
object
One offset mark. Serialised flat with an adjacent kind tag, e.g.
{"start":24,"len":6,"kind":"underline"}.
object
object
object
object
object
object
object
object
Where the figure renders relative to the stem. Data, never inferred.
Length in Unicode scalar values. Zero for an image anchor, which marks an attachment point rather than a span.
Offset in Unicode scalar values from the start of text.
object
Plain text plus offset marks. text stays searchable as characters;
structure rides in inline as Unicode-scalar offsets, never bytes.
object
One offset mark. Serialised flat with an adjacent kind tag, e.g.
{"start":24,"len":6,"kind":"underline"}.
object
object
object
object
object
object
object
object
Where the figure renders relative to the stem. Data, never inferred.
Length in Unicode scalar values. Zero for an image anchor, which marks an attachment point rather than a span.
Offset in Unicode scalar values from the start of text.
Plain text plus offset marks. text stays searchable as characters;
structure rides in inline as Unicode-scalar offsets, never bytes.
object
One offset mark. Serialised flat with an adjacent kind tag, e.g.
{"start":24,"len":6,"kind":"underline"}.
object
object
object
object
object
object
object
object
Where the figure renders relative to the stem. Data, never inferred.
Length in Unicode scalar values. Zero for an image anchor, which marks an attachment point rather than a span.
Offset in Unicode scalar values from the start of text.
Example
{ "questions": [ { "explanation": { "body": { "inline": [ { "kind": "bold" } ] }, "key_point": { "inline": [ { "kind": "bold" } ] }, "trap": { "inline": [ { "kind": "bold" } ] } }, "options": [ { "text": { "inline": [ { "kind": "bold" } ] } } ], "text": { "inline": [ { "kind": "bold" } ] } } ]}An API key is missing or invalid.
Stable body returned by HTTP error responses.
object
Example generated
{ "code": "example", "error": "example"}The API key lacks the required scope.
Stable body returned by HTTP error responses.
object
Example generated
{ "code": "example", "error": "example"}No such novel
Stable body returned by HTTP error responses.
object
Example generated
{ "code": "example", "error": "example"}The caller has exceeded the applicable rate limit.
Stable body returned by HTTP error responses.
object
Example generated
{ "code": "example", "error": "example"}The API is temporarily unavailable.
Stable body returned by HTTP error responses.
object
Example generated
{ "code": "example", "error": "example"}