Skip to content

Reads one bank question's body, with its answer key.

GET
/api/v1/questions/{id}
curl --request GET \
--url https://app.jadwigo.pl/api/v1/questions/example \
--header 'Authorization: Bearer <token>'

Called with the bank’s shared read token, not a Supabase token: without it the reply is 401, whatever the id.

id
required
string

OK.

Media typeapplication/json

One bank question’s private body from questions//.json: a version per language with its family, data, key and help, the credit and the pictures by sha; a question with no playable variant yet carries only id, credit and problem_type; it reaches only a caller with the read token

object
id
required

A bank question’s id: a Khan item id such as x1a2b3c4, letters, digits, _ and - only

string
/^[A-Za-z0-9_-]{1,64}$/
source
string
Allowed value: khan
pl
object
family
required
string
>= 1 characters
data
required
object
key
additional properties
key
required
object
key
additional properties
help
object
key
additional properties
say
string
en
object
family
required
string
>= 1 characters
data
required
object
key
additional properties
key
required
object
key
additional properties
help
object
key
additional properties
say
string
problem_type
string
credit
required
object
source
required
string
>= 1 characters
url
string format: uri
licence
required
string
>= 1 characters
pictures
Array<object>
object
ref
required

The picture’s sha256 with its extension, under /media/ in the bucket

string
/^[0-9a-f]{64}\.[a-z0-9]+$/
decorative
required
boolean
pl

The picture’s Polish alternative text

string

Example

{
"source": "khan"
}

An error: {error: {type, message}}. The type names the cause, and answers with one status:

  • 400: BadRequest, ServerFieldSupplied
  • 401: NotSignedIn, Unauthorized
  • 404: NotFound
  • 409: AccountMissing, AttemptClaimed, AttemptPreview, AssignmentClosed, AttemptFinished, AttemptNotFinished, AttemptPaused, QuestionNotOpen, TryOutOfOrder, AnswerConflict, EventIdMismatch, WriteOnce
  • 429: AnswerLimit
  • 502: BankUnavailable
Media typeapplication/json
object
error
required
object
type
required
string
Allowed values: BadRequest ServerFieldSupplied NotSignedIn NotFound AccountMissing AttemptClaimed AttemptPreview AssignmentClosed AttemptFinished AttemptNotFinished AttemptPaused QuestionNotOpen TryOutOfOrder AnswerConflict EventIdMismatch WriteOnce AnswerLimit Unauthorized BankUnavailable
message
required
string

Example

{
"error": {
"type": "BadRequest"
}
}

An error: {error: {type, message}}. The type names the cause, and answers with one status:

  • 400: BadRequest, ServerFieldSupplied
  • 401: NotSignedIn, Unauthorized
  • 404: NotFound
  • 409: AccountMissing, AttemptClaimed, AttemptPreview, AssignmentClosed, AttemptFinished, AttemptNotFinished, AttemptPaused, QuestionNotOpen, TryOutOfOrder, AnswerConflict, EventIdMismatch, WriteOnce
  • 429: AnswerLimit
  • 502: BankUnavailable
Media typeapplication/json
object
error
required
object
type
required
string
Allowed values: BadRequest ServerFieldSupplied NotSignedIn NotFound AccountMissing AttemptClaimed AttemptPreview AssignmentClosed AttemptFinished AttemptNotFinished AttemptPaused QuestionNotOpen TryOutOfOrder AnswerConflict EventIdMismatch WriteOnce AnswerLimit Unauthorized BankUnavailable
message
required
string

Example

{
"error": {
"type": "BadRequest"
}
}

An error: {error: {type, message}}. The type names the cause, and answers with one status:

  • 400: BadRequest, ServerFieldSupplied
  • 401: NotSignedIn, Unauthorized
  • 404: NotFound
  • 409: AccountMissing, AttemptClaimed, AttemptPreview, AssignmentClosed, AttemptFinished, AttemptNotFinished, AttemptPaused, QuestionNotOpen, TryOutOfOrder, AnswerConflict, EventIdMismatch, WriteOnce
  • 429: AnswerLimit
  • 502: BankUnavailable
Media typeapplication/json
object
error
required
object
type
required
string
Allowed values: BadRequest ServerFieldSupplied NotSignedIn NotFound AccountMissing AttemptClaimed AttemptPreview AssignmentClosed AttemptFinished AttemptNotFinished AttemptPaused QuestionNotOpen TryOutOfOrder AnswerConflict EventIdMismatch WriteOnce AnswerLimit Unauthorized BankUnavailable
message
required
string

Example

{
"error": {
"type": "BadRequest"
}
}