Learnosity Labs

 
 
 
 
 
 

ibk-analysis-by-question — End-to-end Demo

Step 1: Initialise a new dataset using Data API

Create and configure a new dataset.

Call Data API to initialise a dataset job with the desired item analysis config.

Endpoint https://data.learnosity.com/latest/reports/datasets
HTTP Method POST
Action Type set
Parameter Description
dataset_type
string
"ibk-analysis-by-question"
Other parameters See implementation guide.

The endpoint returns a dataset_id and one or more URLs (input_files) to which input files need to be uploaded (in step 2). If input files are not required to be uploaded (determined by the file_count parameter), a dataset_type and a job_reference are returned, and you can proceed directly to step 3 below.

Request

Response

Step 2 (a): Upload sessions filters

Upload the input files required for the dataset. The data is uploaded to a specific URL returned from step 1.

Use a PUT request to upload your session filters to the input_files URLs.

Once all the input files have been uploaded, the dataset-generation job can be started, in step 2(b).

Input file

Response

Step 2 (b): Commence dataset aggregation job

Notify Data API that input files have been uploaded and kick off the dataset generation job.

Call Data API with the dataset_type and dataset_id from step 1.

Endpoint https://data.learnosity.com/latest/jobs/reports/datasets
HTTP Method POST
Action Type set
Parameter Description
dataset_type
string
"ibk-analysis-by-question"
dataset_id
string

Identifier of the dataset to begin generating, obtained in step 1.

The endpoint returns a job_reference which is used to poll its status, in step 3.

Request

Response

Step 3: Poll for job completion

Monitor the status of the job for completion through Data API.

Endpoint https://data.learnosity.com/latest/jobs
HTTP Method POST
Action Type get
Parameter Description
references
array

An array containing the job_reference obtained in step 1 or step 2(b).

The endpoint returns the status of the job, usually queued, running or completed. If an error occurred, the status will be halted, and an error message will be present in results.error.

Request

Response

Step 4: Retrieve Data

Retrieve results via Data API. On completion, raw report data can be retrieved by your server application using Data API.

Query Data API to retrieve the generated datasets.

Endpoint https://data.learnosity.com/latest/reports/datasets
HTTP Method POST
Action Type get
Parameter Description
dataset_type
string
"ibk-analysis-by-question"
dataset_id
string

Identifier of the dataset to retrieve, obtained in step 1.

The endpoint returns a list of output files in different formats (json, csv.gz).

  • summary: A JSON summary of your dataset. Contains summary_fields data.
  • dataset: The full dataset containing fields data for all questions.

Request

Warning: Analysis job may not have completed.

Response

Datasets

  • waiting for data...