PUT /api/v3/class/ID

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
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:

  • 0. Allow lab access before class (default).
    Students can access the lab up to 30 minutes prior to class start. The class instructor has access to a lab.
  • 1. Allow lab access before class for instructor only.
    Students do not have access to their lab before class start time. The class instructor has access to a lab.
  • 2. No early access allowed.
    Students do not have access to their lab before class start time. The class instructor will not be able to create an Instructor Environment prior to class start.
useCustomInvitationEmail >Boolean. Whether or not the student invitation email is customized.

  • true. A customized student invitation email will be used when students are sent invitations to attend class.
  • false. The default student invitation email will be used when students are sent invitation emails to this class.
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.

  • true. Any unregistered user who has the class link and passphrase will be able to enter the class. They will be required to provide their email, first name and last name and will be added as students to the class.
  • false. Only users who are added to the class by project member users will be able to enter 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:

  • state. String. Optional
  • address1. String. Optional
  • address2. String. Optional
  • zipCode. String. Optional
  • city. String. Optional
  • country. To retrieve valid values for country, use GET /api/v3/class/actions/countries
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.

  • true. The class is a self-paced class.
  • false (Default). The class is an Instructor-led class.
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"
}