Your Community is getting an upgrade!
Read about our partnership with Higher Logic and how we will build the next generation of the Instructure Community.
Found this content helpful? Log in or sign up to leave a like!
Hi everybody,
I was trying to get the url of a file to be able to read the contents of the file using the following API endpoint
https://myeducationcompany.instructure.com/api/v1/courses/5468/quizzes/32472/reports/8283?include=[file,progress]
and I receive the response below:
Solved! Go to Solution.
I've find out that you will need to GET https://myeducationcompany.instructure.com/api/v1/courses/5468/quizzes/32472/reports/?includes_all_v...
This will show you active reports that include all submissions for each student. Note that this will bring the file object that contains data from the student analysis report.
In the example you sent, you will get this response:
[
{
"id": 8228,
"report_type": "student_analysis",
"readable_type": "Análise do aluno",
"includes_all_versions": true,
"includes_sis_ids": true,
"generatable": true,
"anonymous": true,
"url": "https://myeducationcompany.instructure.com/api/v1/courses/5468/quizzes/32472/reports/8228",
"progress_url": "https://myeducationcompany.instructure.com/api/v1/progress/175985",
"created_at": "2019-10-16T09:28:35Z",
"updated_at": "2019-10-16T09:28:36Z",
"progress": {
"id": 175985,
"context_id": 8228,
"context_type": "Quizzes::QuizStatistics",
"user_id": null,
"tag": "Quizzes::QuizStatistics",
"completion": 100,
"workflow_state": "completed",
"created_at": "2019-10-16T09:28:35Z",
"updated_at": "2019-10-16T09:28:36Z",
"message": null,
"url": "https://myeducationcompany.instructure.com/api/v1/progress/175985"
},
"file": {
"id": 499605,
"uuid": "qlKMaV6MEQbunFFj6QCIubjt7TS8bZc6hjts5rrA",
"folder_id": null,
"display_name": "O que você achou dessa disciplina? Survey Student Analysis Report.csv",
"filename": "quiz_student_analysis_report.csv",
"workflow_state": "pending_upload",
"upload_status": "success",
"content-type": "text/csv",
"url": "https://myeducationcompany.instructure.com/files/499605/download?download_frd=1&verifier=qlKMa00000000FFj6QCIubjt7TS8bZc6hjts5rrA",
"size": 4389,
"created_at": "2019-10-16T09:28:36Z",
"updated_at": "2019-10-16T09:28:36Z",
"unlock_at": null,
"locked": false,
"hidden": false,
"lock_at": null,
"hidden_for_user": false,
"thumbnail_url": null,
"modified_at": "2019-10-16T09:28:36Z",
"mime_class": "file",
"media_entry_id": null,
"locked_for_user": false
},
"quiz_id": 32472
},
{
"id": 8284,
"report_type": "item_analysis",
"readable_type": "Análise de itens",
"includes_all_versions": true,
"includes_sis_ids": false,
"generatable": false,
"anonymous": true,
"url": "https://myeducationcompany.instructure.com/api/v1/courses/5468/quizzes/32472/reports/8284",
"created_at": "2019-10-16T20:02:17Z",
"updated_at": "2019-10-16T20:02:17Z",
"quiz_id": 32472
}
]
The formatting on the include is incorrect. It's an array of strings (identified by the String[] in the type) that you include as a query parameter for each value you want to include.
?include[]=file&include[]=progress
I've find out that you will need to GET https://myeducationcompany.instructure.com/api/v1/courses/5468/quizzes/32472/reports/?includes_all_v...
This will show you active reports that include all submissions for each student. Note that this will bring the file object that contains data from the student analysis report.
In the example you sent, you will get this response:
[
{
"id": 8228,
"report_type": "student_analysis",
"readable_type": "Análise do aluno",
"includes_all_versions": true,
"includes_sis_ids": true,
"generatable": true,
"anonymous": true,
"url": "https://myeducationcompany.instructure.com/api/v1/courses/5468/quizzes/32472/reports/8228",
"progress_url": "https://myeducationcompany.instructure.com/api/v1/progress/175985",
"created_at": "2019-10-16T09:28:35Z",
"updated_at": "2019-10-16T09:28:36Z",
"progress": {
"id": 175985,
"context_id": 8228,
"context_type": "Quizzes::QuizStatistics",
"user_id": null,
"tag": "Quizzes::QuizStatistics",
"completion": 100,
"workflow_state": "completed",
"created_at": "2019-10-16T09:28:35Z",
"updated_at": "2019-10-16T09:28:36Z",
"message": null,
"url": "https://myeducationcompany.instructure.com/api/v1/progress/175985"
},
"file": {
"id": 499605,
"uuid": "qlKMaV6MEQbunFFj6QCIubjt7TS8bZc6hjts5rrA",
"folder_id": null,
"display_name": "O que você achou dessa disciplina? Survey Student Analysis Report.csv",
"filename": "quiz_student_analysis_report.csv",
"workflow_state": "pending_upload",
"upload_status": "success",
"content-type": "text/csv",
"url": "https://myeducationcompany.instructure.com/files/499605/download?download_frd=1&verifier=qlKMa00000000FFj6QCIubjt7TS8bZc6hjts5rrA",
"size": 4389,
"created_at": "2019-10-16T09:28:36Z",
"updated_at": "2019-10-16T09:28:36Z",
"unlock_at": null,
"locked": false,
"hidden": false,
"lock_at": null,
"hidden_for_user": false,
"thumbnail_url": null,
"modified_at": "2019-10-16T09:28:36Z",
"mime_class": "file",
"media_entry_id": null,
"locked_for_user": false
},
"quiz_id": 32472
},
{
"id": 8284,
"report_type": "item_analysis",
"readable_type": "Análise de itens",
"includes_all_versions": true,
"includes_sis_ids": false,
"generatable": false,
"anonymous": true,
"url": "https://myeducationcompany.instructure.com/api/v1/courses/5468/quizzes/32472/reports/8284",
"created_at": "2019-10-16T20:02:17Z",
"updated_at": "2019-10-16T20:02:17Z",
"quiz_id": 32472
}
]
Thanks Tulio,
now I can read the url file
"https://myeducationcompany.instructure.com/files/499605/download?download_frd=1&verifier=qlKMa00000000FFj6QCIubjt7TS8bZc6hjts5rrA",
and filter the results.
To interact with Panda Bot, our automated chatbot, you need to sign up or log in:
Sign InTo interact with Panda Bot, our automated chatbot, you need to sign up or log in:
Sign In