PUT /api/v3/class

Modifies a class

Request Path

PUT /api/v3/class

Request Payload Example

{
    "id": "COTQBKbIH5V2br3eiEdxW9-g2",
    "name": "my new class",
    "instructorVupId": "VPmIJNV_kFBDLrveM0Gmr5ug2",
    "timeZoneId": "Eastern Standard Time",
    "startDate": "02/11/2015 12:00 AM",
    "studentPassphrase": "super secret password",
    "useCustomInvitationEmail": false,
    "customInvitationEmailSubject": null,
    "customInvitationEmailBody": null,
    "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"
    }]
}

Parameters

id The ID of the class. To retrieve class IDs, use GET /api/v3/class.
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.
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
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

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"
}