The Coremetrix Report API facilitates the retrieval of attempt information and scores. This section covers the process of polling the API and checking the resource status
until the required information is available..
The attempt status can be one of the following:
Status | Description |
---|---|
INCOMPLETE | Quiz is yet to be completed, no scores will be present |
COMPLETED_SCORED | Quiz has been completed, expect scores present for all enabled models. |
COMPLETED_PARTIALLY_SCORED | Quiz has been completed, expect scores present for some models and flags present for other models. Note that not all quizzes have multiple models deployed. |
COMPLETED_NOT_SCORED | Unable to score quiz, possible reasons: quiz was answered too fast (no profile will be generated and a FAST_CLICK flag will be present instead), no models have been set up / enabled, etc. |
Some extra information can be deducted by observing the timing information:
timestamp | Description |
---|---|
landing | Quiz landing has been loaded in the browser but but the user has not progressed any further. |
load | Quiz has been loaded in the browser but no answer has been submitted |
load + start | Quiz has been started and at least one answer has been submitted |
load + start + complete | Quiz has been completed, all answers have been submitted |
The API can return one report if we filter by customId. The custom id should be the same puid
used when taking the quiz..
{
}
"customId": "123456789XYZ", "attempts": []
{}
"name": "sandbox", "flags": [ ], "timings": {},
"landing": 1539084813410, "load": 1539084815550, "start": 1539086050697, "end": 1539086175830 "id": "ee1a392f-eccc-4f54-bd72-993e11ddde13", "status": "COMPLETED_SCORED", "quizId": "63f751bb-7a2b-4c86-bfbc-217c1104b36e", "scores": [],
{}
"value": 248.25117341335454, "model": "sandbox" "user": {}
"accommodation": "Private housing", "age": "20-24", "education": "BSc", "maritalStatus": "Single", "occupation": "Self-employed"
The API can return one attempt by id.
{
}
"name": "sandbox", "flags": [ ], "timings": {},
"landing": 1539084813410, "load": 1539084815550, "start": 1539086050697, "end": 1539086175830 "clientInfo": {},
"apiAccount": "sandbox", "customId": "123456789XYZ", "id": "ee1a392f-eccc-4f54-bd72-993e11ddde13", "status": "COMPLETED_SCORED", "quizId": "63f751bb-7a2b-4c86-bfbc-217c1104b36e", "scores": [],
{}
"value": 248.25117341335454, "model": "sandbox" "user": {}
"accommodation": "Private housing", "age": "20-24", "education": "BSc", "maritalStatus": "Single", "occupation": "Self-employed"
The reports can be filtered by quizId
and a date range. quizId
, from
and to
query params are optional. The dates are in ISO8601 format, if dates are not provided then to
defaults to the current date and time, and from
defaults to seven days earlier than to
. The maximum difference between from
and to
cannot be greater than 7 days.
Test attempts are filtered out by default but can be made explicitly available by the includeTest
parameter.
Note: /report/attempts?quizId=63f751bb-7a2b-4c86-bfbc-217c1104b36e&from=2019-07-01T00:00:01Z&to=2019-07-05T16:01:02Z&includeTest=true
{
}
"results": []
{},
"customId": "a5b7c1e5-460f-45e2", "attempts": []
{}
"name": " sandbox", "flags": [ ], "timings": {},
"load": 1562226135859 "id": "05a50ee4-4ffa-45a1-b01d-b043e31cfc41", "status": "INCOMPLETE", "quizId": "63f751bb-7a2b-4c86-bfbc-217c1104b36e", "scores": [ ] {},
"customId": "b28acd4b-0755-4417", "attempts": []
{}
"name": "sandbox", "flags": [ ], "timings": {},
"landing": 1539084813410, "load": 1562225934584, "start": 1562225937347, "end": 1562225956220 "id": "730b9c99-5c68-459b-b583-d96743cfe03f", "status": "COMPLETED_SCORED", "quizId": "63f751bb-7a2b-4c86-bfbc-217c1104b36e", "scores": [],
{}
"value": 256.67901827947344, "model": "sandbox" "user": {}
"accommodation": "Private housing", "age": "20-24", "education": "BSc", "maritalStatus": "Single", "occupation": "Self-employed" {}
"customId": "91fede51-dfcf-4670", "attempts": []
{}
"name": "sandbox", "flags": [ ], "timings": {},
"landing": 1539084813410, "load": 1562225977118, "start": 1562225978135, "end": 1562225984913 "id": "2db0e167-824d-4e78-98ae-a610387cfddf", "status": "COMPLETED_SCORED", "quizId": "63f751bb-7a2b-4c86-bfbc-217c1104b36e", "scores": [],
{}
"value": 234.41970196460838, "model": "sandbox" "user": {}
"accommodation": "Private housing", "age": "20-24", "education": "BSc", "maritalStatus": "Single", "occupation": "Self-employed"
The Consent APIConsent API returns information about users consent.
{
}
"name": "sandbox", "flags": [ ], "timings": {},
"landing": 1539084813410, "load": 1539084815550, "start": 1539086050697, "end": 1539086175830 "clientInfo": {},
"apiAccount": "sandbox", "customId": "123456789XYZ", "id": "ee1a392f-eccc-4f54-bd72-993e11ddde13", "status": "COMPLETED_SCORED", "quizId": "63f751bb-7a2b-4c86-bfbc-217c1104b36e", "scores": [],
{}
"value": 248.25117341335454, "model": "sandbox" "user": {}
"accommodation": "Private housing", "age": "20-24", "education": "BSc", "maritalStatus": "Single", "occupation": "Self-employed"