Add attachment to a quiz or assignment as a learner
The purpose of this API is to add attachment to a quiz or assignment as a learner.
Request URL: | https://learn.zoho.com/learn/api/v1/portal/<portalUrl>/course/courseId/learner-answer/learnerAnswerId/file |
OAuth Scope: | ZohoLearn.attachment.CREATE |
Request Method: | POST |
Parameter | Description | Required |
---|---|---|
previewFile | Attachment file | Required |
attachmentType | 0 for upload files 1 for inserting image | Required |
Response
Copied{
"STATUS": "OK",
"ATTACHMENTS": [
{
"imageWidth": "899",
"fileName": "file_example_PNG_3MB.png",
"extension": "png",
"attachmentItemType": "LEARNER_ANSWER",
"attachmentType": "ATTACH",
"uploadedTime": "Today, 03:51 AM",
"uploadedUserDetails": {
"role": "MEMBER",
"name": "Ben Taylor",
"colorIndex": "1",
"emailId": "taylor@zylker.com",
"id": "799705135",
"type": "MEMBER",
"learnerCourseStatus": "YET_TO_START",
"status": "ACTIVE",
"learnerCourseProgress": "0.0"
},
"imageHeight": "600",
"itemId": "6342496000000091033",
"isImage": "true",
"size": "2.83 MB",
"fileSize": "2964729",
"viewUrl": "/_lms/api/portal/zylker-network/course/6342496000000086001/learner-answer/6342496000000091033/file/6342496000000090013",
"canDelete": "true",
"id": "6342496000000090013",
"viewCount": "0",
"contentType": "image/png",
"downloadCount": "0"
}
]
}
Show full
Show less
Sample URL
Copiedhttps://learn.zoho.com/learn/api/v1/portal/zylker-network/course/6342496000000086001/learner-answer/6342496000000091033/file