Update Files API
This API is used to update files in modules of courses or batches in LMS
Request URL: (Self Paced Course)
https://people.zoho.com/api/v1/courses/<courseId>/modules<moduleId>/files/<fileId>?fileData={"name" : <name>, "file" : <file>, "duration" :<duration>, "description" : <description>, "isMandatory" : <isMandatory>, "isIntroFile" : <isIntroFile>, "enableDownload" : <enableDownload>, "lockUntil" : <lockUntil>}
Request URL: (Blended Learning Course)
https://people.zoho.com/api/v1/courses/<courseId>/batches/<batchId>/modules<moduleId>/files/<fileId>?fileData={"name" : <name>, "file" : <file>, "duration" :<duration>, "description" : <description>, "isMandatory" : <isMandatory>, "isIntroFile" : <isIntroFile>, "enableDownload" : <enableDownload>, "lockUntil" : <lockUntil>}
Header:
Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxx9be93.9b8xxxxxxf
Scope:
ZOHOPEOPLE.training.ALL
OR
ZOHOPEOPLE.training.UPDATE
Possible Operation Types:
ALL - Complete access to data
UPDATE - Only to update data
Method:
PATCH
Request Parameters
Parameters | Values Allowed | Default Value | Description |
*fileData | <parameters in JSON Object> | JSON Input |
Parameters | Values Allowed | Default Value | Description |
name | <file name> | <Mandatory> | Specify the file name |
file | <File> | <Mandatory> | Specify the file |
duration | <Duration in minutes> | - | Specify the duration |
description | <Description> | - | Specify the description |
isMandatory | <true|false> | true | Specify if the file is mandatory or not |
isIntroFile | <true|false> | false | Specify if the file is intro file or not |
enableDownload | <true|false> | true | Specify if the file can be downloaded or not |
lockUntil | <lockUntil date in DD-MM-YYYY format> | - | Specify the lockUntil date |
resources | <files> | - | Specify resources |
*mandatory parameters
Request
Copiedhttps://people.zoho.com/api/v1/courses/219225000000642002/modules/219225000000648001/files/219225000000648115?fileData={"name" : "File API Testing_update", "duration" : 100, "description" : "File API description testing", "isMandatory" : true, "isIntroFile" : true, "enableDownload" : true, "lockUntil" : "28-12-2021"}
Header
CopiedAuthorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxx9be93.9b8xxxxxxf
Response
Copied{
"code": 200,
"file": {
"isMandatoryFile": true,
"fileName": "File One_update",
"previewURL": "",
"canMarkAsComplete": 0,
"description": "Description for File",
"resources": [],
"canUserDelete": true,
"duration": "100 Mins",
"lockUntil": "27-12-2021",
"isDownloadable": true,
"isIntroFile": true,
"isLocked": true,
"canUserEdit": true,
"moduleId": "219225000000648001",
"fileId": "219225000000648115"
},
"message": "success"
}