[Submissions API] API query for assignment submissions should include speedgrader_url

When an assignment's submissions are queried using the API, you get something like the attached below (hopefully redacted enough).

Notably, this DOES NOT include the speedgrader_url information, which is included as part of the provision_grades data structure AFTER an assessor has provided grades (in the case of a moderated assignment). Currently I need to construct the speedgrader_url manually, which is a bit of a pain and could be subject to substantial errors if the URLs change in the future. 

 

 

 

  {
    anonymous_id = "k4jD5",
    assignment_id = 207753,
    attachments = {
      {
        ["content-type"] = "application/pdf",
        created_at = "2021-06-04T02:38:13Z",
        display_name = "InterimPaper____-1.pdf",
        filename = "InterimPaper____.pdf",
        folder_id = 1292463,
        hidden = false,
        hidden_for_user = false,
        id = 8973506,
        locked = false,
        locked_for_user = false,
        mime_class = "pdf",
        modified_at = "2021-06-04T02:38:13Z",
        preview_url = "/api/v1/canvadoc_session?blob=%7B%22moderated_grading_allow_list%22:null,%22enable_annotations%22:true,%22enrollment_type%22:%22teacher%22,%22anonymous_instructor_annotations%22:false,%22submission_id%22:22771741,%22user_id%22:70360000000002898,%22attachment_id%22:8973506,%22type%22:%22canvadoc%22%7D&hmac=715f7f8ee35db06a42f3dfb9033c9167c3d862f2",
        size = 1161279,
        updated_at = "2021-06-04T02:38:15Z",
        upload_status = "success",
        url = "https://____/files/8973506/download?download_frd=1&verifier=V4aUjAewotKkEL7TlpMRQE6EPeggzlFygtRDf0FU",
        uuid = "V4aUjAewotKkEL7TlpMRQE6EPeggzlFygtRDf0FU"
      }
    },
    attempt = 2,
    cached_due_date = "2021-06-04T05:30:00Z",
    grade_matches_current_submission = true,
    has_originality_report = true,
    id = 22771741,
    late = false,
    missing = false,
    preview_url = "https://____/courses/64478/assignments/207753/submissions/143171?preview=1&version=2",
    seconds_late = 0,
    submission_comments = {
    },
    submission_type = "online_upload",
    submitted_at = "2021-06-04T02:38:13Z",
    turnitin_data = {
      attachment_8973506 = {
        error_message = "",
        similarity_score = 18.0,
        state = "acceptable",
        status = "scored"
      },
      eula_agreement_timestamp = "1622774291655"
    },
    user = {
      avatar_url = "https://___/images/messages/avatar-50.png",
      created_at = "2021-03-10T02:02:42+10:30",
      id = 143171,
      login_id = "a1805185",
      name = "___",
      short_name = "___",
      sis_user_id = "1805185",
      sortable_name = "___"
    },
    user_id = 143171,
    workflow_state = "submitted"
  }

 

 

 

 

Added to Theme

Build new or more robust API endpoints Theme Status: Identified

3 Comments
Stef_retired
Instructure Alumni
Instructure Alumni
Status changed to: Open
 
KristinL
Community Team
Community Team
Status changed to: New
 
KristinL
Community Team
Community Team
Status changed to: Added to Theme