Implementation Step 1:
Initialize dataset
Initialize a new report dataset using Data API's SET /reports/datasets
endpoint. The request data specifies the configuration for the dataset including which fields to calculate.
The specific request and response format depends on the type of dataset being generated. See the attributes relevant for each type of dataset:
- activity-summary-by-group
- sessions-summary-by-group
- ibk-analysis-by-question
- activity-analysis-by-question
The endpoint returns a dataset_id
for the new dataset.
If you are required to upload input files as part of your request, as indicated by the file_count
param, the response also provides a list of input_files
URLs, which are used in step 2.
If you are not providing input files, the response will contain a job_reference
, and you can proceed to step 3.
Sample request
{
"dataset_type": "activity-summary-by-group",
"file_count": 1,
"filters": {
"activity_id": [
"20170106b_ELA_comprehension"
]
},
"options": {
"default_sort_field": "mean_percent",
"default_sort_order": "desc",
"fields": [
"group_count",
"population",
"lowest_score",
"highest_score",
"mean_seen_activities",
"mean_attempted_percent",
"mean_score",
"median_score",
"p25_score",
"p75_score",
"p90_score",
"stddev_score",
"lowest_percent",
"highest_percent",
"mean_percent",
"median_percent",
"p25_percent",
"p75_percent",
"p90_percent",
"stddev_percent"
],
"default_users_sort_field": "score",
"default_users_sort_order": "desc",
"user_fields": [
"score",
"attempted_max_score",
"unscored_max_score",
"max_score",
"seen_activities"
]
},
"groups": [
{
"key": "district",
"label": "District"
},
{
"key": "school",
"label": "School"
},
{
"key": "class",
"label": "Class"
}
]
}
Sample response
{
"meta": {
"status": true,
"timestamp": 1483585276
},
"data": {
"dataset_id": "ce6c3842-5366-486d-a68f-ab9e6160e9de",
"input_files": [
"https://learnosity-reportdatasets-va.s3.amazonaws.com/reports/0034/activity-summary-by-group/ce6c3842-5366-486d-a68f-ab9e6160e9de/infiles/0.ndjson?AWSAccessKeyId=AKIAJB5XQL2VQTD4KG6Q&Expires=1483588877&Signature=QUXjR0beW83bB7l1OpiTMOKRsKc%3D"
]
}
}