Quiz Statistics

Schema #

The schema defines all the fields that exist within a quiz statistics record. Any response from these endpoints can be expected to contain the fields below unless the `_filter` query parameter is used or the schema field only appears in a specific context.

id
integer

Statistics Ref ID.

Read only

Context: embed, view

quiz
integer

Quiz ID.

Read only

Context: embed, view

user
integer

User ID.

Read only

Context: embed, view

date
string,

Date.

Read only

Context: embed, view

answers_correct
integer

Answer correct.

Read only

Context: embed, view

answers_incorrect
integer

Answer incorrect.

Read only

Context: embed, view

List Quiz Statistics #

Query this endpoint to retrieve a collection of quiz statistics. The response you receive can be controlled and filtered using the URL query parameters below.

Definition #

GET /ldlms/v2/sfwd-quiz/<quiz>/statistics

Example Request #

$ curl https://example.com/wp-json/ldlms/v2/sfwd-quiz/<quiz>/statistics

Arguments #

quiz

Filter by Quiz ID

Required: 1

context

Scope under which the request is made; determines fields present in response.

page

Current page of the collection.

Default: 1

per_page

Maximum number of items to be returned in result set.

Default: 10

order

Order sort attribute ascending or descending.

Default: desc

One of: asc, desc

orderby

Sort collection by object attribute.

Default: date

One of: date, id, quiz, user

user

Filter by User ID

after

Limit response items after a given ISO8601 compliant date.

before

Limit response to items before a given ISO8601 compliant date.