Submission Comments

This API can be used to edit and delete submission comments.

SubmissionCommentsApiController#update

PUT /api/v1/courses/:course_id/assignments/:assignment_id/submissions/:user_id/comments/:id

Scope: url:PUT|/api/v1/courses/:course_id/assignments/:assignment_id/submissions/:user_id/comments/:id

Edit the given submission comment.

Request Parameters:

ParameterTypeDescription

comment

string

If this argument is present, edit the text of a comment.

Returns a SubmissionComment object.

SubmissionCommentsApiController#destroy

DELETE /api/v1/courses/:course_id/assignments/:assignment_id/submissions/:user_id/comments/:id

Scope: url:DELETE|/api/v1/courses/:course_id/assignments/:assignment_id/submissions/:user_id/comments/:id

Delete the given submission comment.

Example Request:

curl https://<canvas>/api/v1/courses/<course_id>/assignments/<assignment_id>/submissions/<user_id>/comments/<id> \
     -X DELETE \
     -H 'Authorization: Bearer <token>'

Returns a SubmissionComment object.

SubmissionCommentsApiController#create_file

POST /api/v1/courses/:course_id/assignments/:assignment_id/submissions/:user_id/comments/files

Scope: url:POST|/api/v1/courses/:course_id/assignments/:assignment_id/submissions/:user_id/comments/files

Upload a file to attach to a submission comment

See the File Upload Documentation for details on the file upload workflow.

The final step of the file upload workflow will return the attachment data, including the new file id. The caller can then PUT the file_id to the submission API to attach it to a comment


© Instructure, Inc. Generated on Wed Nov 6 14:20:09 2024 This documentation is generated directly from the Canvas LMS source code, available on Github.

Last updated

Copyright © 2024 Instructure, Inc. All rights reserved.