Create Files API

This API is used to create 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?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?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.CREATE

Possible Operation Types:

ALL - Complete access to data
CREATE - Only to create data

Method:

POST

Request Parameters

ParametersValues AllowedDefault ValueDescription
*fileData <parameters in JSON Object> JSON Input

 

ParametersValues AllowedDefault ValueDescription
*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>trueSpecify if the file is mandatory or not
isIntroFile<true|false>falseSpecify if the file is intro file or not
enableDownload<true|false>trueSpecify 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?fileData={"name" : "File API Testing", "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",
        "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"
}