Description: This API helps you create an assignment in a course.
Request URL: /api/v4/<orgId>/sessions.json (How do I get my orgId?)
Method: POST
OAuth scope: TrainerCentral.sessionapi.CREATE
Parameters:
- {
- "session":{
- "name":"<assignment name>",
- "courseId":"<courseId>",
- "sectionId":"<sectionId>",
- "deliveryMode":7,
- "sessionSettings": {"registrationRequired": false}
- }
- }
Parameters - description
1. name - The name of the assignment.
2. courseId - The Id of the course under which the assignment has to be created.
3. sectionId - The Id of the chapter under which the assignment has to be created.
4. deliveryMode - 7 for assignment.
Sample response for the API
- {
- "ticketsInfo":
- {
- "tickets":
- {
- "session”:<assignmentId>,
- "maximumPurchaseLimit":"1",
- "description”:<description>,
- "orgId”:<orgId>,
- "frequency":"1",
- "paymentType":"0",
- "createdTime":"1646227290733",
- "lastUpdatedTime":"1646227290733",
- "id”:<ticketId>,
- "deletedTime":"-1",
- "expiryDurationType":"0",
- "lastUpdatedBy”:<userId>,
- "amount":"0.0",
- "isTaxable":"false",
- "ticketType":"0",
- "sessionId”:<assignmentId>,
- "isDefault":"true”,
- "createdBy”:<userId>,
- "billingCycle":"-1",
- "frequencyType":"-1",
- "name”:<assignmentName>,
- "expiryDuration":"0",
- "ticketId”:<ticketId>,
- "status":"1"
- }
- },
- "sessionMembers":
- [
- {
- "country":"us",
- "role":"1",
- “encryptedSessionMemberId”:<encryptedSessionMemberId>,
- "session”:<assignmentId>,
- "sessionMemberId”:<sessionMemberId>,
- "language":"en",
- "emailId”:<userEmail>,
- "sessionId”:<assignmentId>,
- "presenterImageUrl”:<presenterImageURL>,
- "userId”:<userId>,
- "orgId”:<orgId>,
- "name”:<userName>,
- "createdTime":"1646227290691",
- "time":"1646227290691",
- "id”:<sessionMemberId>
- }
- ],
- "session":
- {
- "sessionIndex":"3",
- "timezone”:<UserTimeZone set>,
- "attendeeLimit":"100",
- "createdbyName”:<userName>,
- "orgId”:<orgId>,
- "protoFlag":"1",
- "recurringType":"0",
- "deliveryMode":"7",
- "sessionType":"1",
- "course”:<courseId>,
- "createdTime":"1646227290674",
- "scheduledBy”:<userId>,
- "id”:<assignmentId>,
- "joinURL”:<joinUrl>,
- "deletedTime":"-1",
- "courseId”:<courseId>,
- "registeredCount":"0",
- "invitedCount":"0",
- "orgName”:<orgName>,
- "scheduledTime":"1646227290655",
- "presenterAutoStartUrl”:<presenterAutoStartURL>,
- "presenterUrl”:<presenterURL>,
- "uniqueKey”:<uniqueKey>,
- "scheduledEndTime":"1646230890655",
- "sessionId”:<assignmentId>,
- "attendedCount":"0",
- "paymentsHomePageURL”:<paymentsURL>,
- "referrer":"1",
- "scheduleType":"0",
- "createdBy”:<userId>,
- "name”:<assignmentName>,
- "zaid”:<zaid>,
- "memberRole":"2"
- },
- "talks":
- [
- {
- ”owner”:<userId>,
- "scheduledTime":"1646227290655",
- "deliveryMode":"7",
- "session”:<assignmentId>,
- "sessionType":"1",
- "id”:<talkId>,
- "sessionId”:<assignmentId>,
- "talkId”:<talkId>,
- "orgId”:<orgId>,
- "status":"1",
- "registeredCount":"0"
- }
- ],
- "sessionCategories":[]
- }