AnsweredAssumed Answered

REST API won't let me download student submission

Question asked by goh.ian on Jul 12, 2018
Latest reply on Jul 17, 2018 by Peter Love


On the preview-learn site, I was testing the REST API call w/ my classic course _10829_1

GET /learn/api/public/v1/courses/{courseId}/gradebook/attempts/{attemptId}/files/{attemptFileId}/download

 

 

Log into  preview-learn.blackboard.com  as instructor

 

Get the grade book columns in my classic course _10829_1

 

https://preview-learn.blackboard.com/learn/api/public/v2/courses/_10829_1/gradebook/columns

 

I know I want the column with {"id":"_303297_1",...

 

So I get the attempts for the course and column _303297_1

 

https://preview-learn.blackboard.com/learn/api/public/v2/courses/_10829_1/gradebook/columns/_303297_1/attempts

It gives me the one student submission

 

{"results":[{"id":"_5045_1","userId":"_20229_1","status":"Completed","displayGrade":{"scaleType":"Score","score":1.00000},"text":"1.00000","score":1.000000000000000,"exempt":false,"created":"2018-07-10T16:28:41.828Z","attemptDate":"2018-07-10T16:28:41.844Z"}]}

 

 

Then using   attemptId _5045_1 ,I query for the files

 

https://preview-learn.blackboard.com/learn/api/public/v1/courses/_10829_1/gradebook/attempts/_5045_1/files

 

I get the one student submission

 

 

{"results":[{"id":"_52697_1","name":"loremipsum.pdf","viewUrl":"https://blackboard.ent.box.com/preview..."}]}

 

Finally, download the file from course _10829_1, attemptId _5045_1, attemptFileId _52697_1

 

 

https://preview-learn.blackboard.com/learn/api/public/v1/courses/_10829_1/gradebook/attempts/_5045_1/files/_52697_1/download

 

the URL becomes

 

 

https://preview-learn.blackboard.com/bbcswebdav/internal/courses/original_course1_ian.gohjhu.edu_20160715_125023/attempt/_5045_1/s/loremipsum.pdf?isForcedDownload=true&downloadFileName=loremipsum.pdf&...

 

 

But I get a File Not Found

 

 

The specified resource was not found, or you do not have permission to access it.

Thursday, July 12, 2018 7:20:07 PM UTC

 

Any idea why this isn't working?

Outcomes