Modifies a class
Request Path
PUT /api/v3/class/{classId}
Request Payload Example
{ "id": "COTQBKbIH5V2br3eiEdxW9-g2", "name": "my new class", "instructorVupId": "VPmIJNV_kFBDLrveM0Gmr5ug2", "timeZoneId": "Eastern Standard Time", "startDate": "02/11/2015 12:00 AM", "endDate": "02/12/2015 12:00 AM", "studentPassphrase": "super secret password", "useCustomInvitationEmail": false, "customInvitationEmailSubject": null, "customInvitationEmailBody": null, "limitEarlyAccess": 0, "permitAccessToNonRegisteredStudent": true, "maxStudents": 5, "address": { "state": "Alabama", "address1": "3000 Foggy Woods", "address2": "", "zipCode": "002233", "city": "Gravity", "country": "United States" }, "customFieldsValues": [{ "id": "TFTQBKbIH5V2br3eiEdxW9-g2", "order": 1, "name": "clientId", "type": 0, "isRequired": false, "regex": {}, "defaultValue": null, "value": "1234" }], "selfPaced": false, "allowMultipleStudentLogin": true }
Parameters
id |
The ID of the class. To retrieve class IDs, use GET /api/v3/class. Please note: id should be provided both in URL in request body. |
name |
The name of the class |
instructorVupId |
The ID of the project member user to assign to the class as the instructor. To retrieve available instructor IDs, use GET /api/v3/class/actions/instructors |
projectId |
The ID of the project in which to create the class. To retrieve available projects, use GET /api/v3/projects |
blueprintId |
The ID of the blueprint from which to create the environments of the class. To retrieve available blueprints, use GET /api/v3/projects/ID/blueprints |
policyId |
The ID of the policy to apply to the environments of the class. To retrieve available policies, use GET /api/v3/projects/ID/policies |
startDate |
The date and time at which to start the class, in MM/DD/YYYY HH:MM AM/PM format. |
endDate |
The date and time at which the class will end, in MM/DD/YYYY HH:MM AM/PM format. If no endDate is specified, the date and time will be calculated as: startDate + the length of time specified by the current class policy. |
timeZoneId |
The ID of the timezone for the startDate . To retrieve valid timezone IDs, use GET /api/v3/timezones |
studentPassphrase |
The passphrase that students will need to enter in order to attend the class |
limitEarlyAccess |
Numeric. This option controls access by students and instructor to a lab before scheduled class time. Possible values:
|
useCustomInvitationEmail |
>Boolean. Whether or not the student invitation email is customized.
|
customInvitationEmailSubject |
String. The subject line of the custom student invitation email. Used if UseCustomInvitationEmail is set to true . |
customInvitationEmailBody |
The body of the custom student invitation email. Used if UseCustomInvitationEmail is set to true . |
permitAccessToNonRegisteredStudent |
Boolean. Whether to permit users to self register as students for the class.
|
maxStudents |
Numeric. The maximum number of students allowed in the class (can be null). Maximum value: 60 |
address |
The location of the class. Includes:
|
customFieldsValues |
Specifies input values for custom fields defined for class creation in the project. Mandatory if project forces validation of custom fields. Fields and valid values depend on custom fields structure for the project. To retrieve custom fields structure for the project, use GET /api/v3/class/actions/customfields |
selfPaced |
Optional. Boolean. Creates a Self-Paced Class that allows a student to enter class at a time convenient to them.
|
allowMultipleStudentLogin |
Optional. Boolean. When set to true, allows for more than one environment activation per student. |
Response Example
{ "id": "COTQBKbIH5V2br3eiEdxW9-g2", "name": "my new class", "shortId": "2vs2t", "policyId": "POstwZpTbLpqpGR2yI4cbGOw2", "policyName": "2 hours", "isUsingClassTypes": false, "blueprintId": "BPvY9ME2CJ8dg-TyTeUvcKzw2", "blueprintName": "Testing Blueprint", "blueprintToken": "LZOGAB", "cloudName": "CloudShare", "timeZoneId": "Eastern Standard Time", "projectId": "PR_E3-ZqX0AvUr_p3TgD-wtg2", "projectName": "API Testing", "creatorName": "The Architect", "creatorEmail": "architect@cloudshare.com", "instructorVupId": "VPmIJNV_kFBDLrveM0Gmr5ug2", "instructorName": "john doe", "defaultDurationInMinutes": 480, "allowStartDateEditing": false, "studentPassphrase": "password", "useCustomInvitationEmail": false, "showCourseAddressField": true, "address": null, "customInvitationEmailSubject": null, "customInvitationEmailBody": null, "defaultInvitationEmailSubject": "${CourseName} - Virtual Lab Access", "defaultInvitationEmailBody": "You have been invited to access your own private ${BlueprintName} virtual lab (using CloudShare)", "showPermitAccessToNonRegisteredStudent": true, "allowEditDefaultsWhenPermitAccessToNonRegistered": true, "permitAccessToNonRegisteredStudent": true, "showMaxStudentsField": true, "maxStudents": 5, "maxLimitOnMaxStudentField": 60, "customFieldsValues": [ { "id": "TFTQBKbIH5V2br3eiEdxW9-g2", "order": 1, "name": "clientId", "type": 0, "isRequired": false, "regex": "", "defaultValue": null, "value": null } ], "instructorEmail": "jd@cloudshare.com", "timeZoneName": "(UTC-05:00) Eastern Time (US & Canada)", "startDate": "01/01/2015 12:00 AM", "endDate": "01/31/2015 12:00 AM", "status": "expired" }