Create assignment API

Create assignment API

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:

  1. {
  2. "session":{
  3.                 "name":"<assignment name>",
  4.                 "courseId":"<courseId>",
  5.                 "sectionId":"<sectionId>",
  6.                 "deliveryMode":7,
  7. "sessionSettings": {"registrationRequired": false}
  8. }
  9. }

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

  1. {
  2.   "ticketsInfo":
  3.    {
  4.      "tickets":  
  5.       {
  6.         "session”:<assignmentId>,
  7. "maximumPurchaseLimit":"1",
  8. "description”:<description>,
  9. "orgId”:<orgId>,
  10. "frequency":"1",
  11. "paymentType":"0",
  12. "createdTime":"1646227290733",
  13. "lastUpdatedTime":"1646227290733",
  14. "id”:<ticketId>,
  15. "deletedTime":"-1",
  16. "expiryDurationType":"0",
  17. "lastUpdatedBy”:<userId>,
  18. "amount":"0.0",
  19. "isTaxable":"false",
  20. "ticketType":"0",
  21. "sessionId”:<assignmentId>,
  22. "isDefault":"true”,
  23. "createdBy”:<userId>,
  24. "billingCycle":"-1",
  25. "frequencyType":"-1",
  26. "name”:<assignmentName>,
  27. "expiryDuration":"0",
  28. "ticketId”:<ticketId>,
  29. "status":"1"
  30. }
  31.       },
  32.       "sessionMembers": 
  33. [
  34.   {
  35.     "country":"us",
  36.     "role":"1",
  37.     “encryptedSessionMemberId”:<encryptedSessionMemberId>,
  38.              "session”:<assignmentId>,
  39.              "sessionMemberId”:<sessionMemberId>,
  40.              "language":"en",
  41.              "emailId”:<userEmail>,
  42.              "sessionId”:<assignmentId>,
  43.              "presenterImageUrl”:<presenterImageURL>,
  44.              "userId”:<userId>,
  45.              "orgId”:<orgId>,
  46.              "name”:<userName>,
  47.              "createdTime":"1646227290691",
  48.              "time":"1646227290691",
  49.              "id”:<sessionMemberId>
  50.              }
  51.            ],
  52.            "session":
  53.     {
  54. "sessionIndex":"3",
  55. "timezone”:<UserTimeZone set>,
  56. "attendeeLimit":"100",
  57. "createdbyName”:<userName>,
  58. "orgId”:<orgId>,
  59. "protoFlag":"1",
  60. "recurringType":"0",
  61. "deliveryMode":"7",
  62. "sessionType":"1",
  63. "course”:<courseId>,
  64. "createdTime":"1646227290674",
  65. "scheduledBy”:<userId>,
  66. "id”:<assignmentId>,
  67. "joinURL”:<joinUrl>,
  68. "deletedTime":"-1",
  69. "courseId”:<courseId>,
  70. "registeredCount":"0",
  71. "invitedCount":"0",
  72. "orgName”:<orgName>,
  73. "scheduledTime":"1646227290655",
  74. "presenterAutoStartUrl”:<presenterAutoStartURL>,
  75. "presenterUrl”:<presenterURL>,
  76. "uniqueKey”:<uniqueKey>,
  77. "scheduledEndTime":"1646230890655",
  78. "sessionId”:<assignmentId>,
  79. "attendedCount":"0",
  80. "paymentsHomePageURL”:<paymentsURL>,
  81. "referrer":"1",
  82. "scheduleType":"0",
  83. "createdBy”:<userId>,
  84. "name”:<assignmentName>,
  85. "zaid”:<zaid>,
  86. "memberRole":"2"
  87.     },
  88.     "talks":
  89.     [
  90. {
  91.   ”owner”:<userId>,
  92.   "scheduledTime":"1646227290655",
  93.           "deliveryMode":"7",
  94.   "session”:<assignmentId>,
  95.   "sessionType":"1",
  96.   "id”:<talkId>,
  97.           "sessionId”:<assignmentId>,
  98.   "talkId”:<talkId>,
  99.   "orgId”:<orgId>,
  100.   "status":"1",
  101.   "registeredCount":"0"
  102. }
  103.     ],
  104.     "sessionCategories":[]
  105. }


    • Related Articles

    • List of all TrainerCentral APIs

      Getting Started Get Oauth token API Course APIs Create chapter API Edit chapter API Create course API Edit course API Create lesson API Edit lesson API Create assignment API Delete lesson/live workshop/assignment API Delete chapter API Delete course ...
    • Create a Group

      The Groups feature helps you create a group with a specific set of learners to monitor their course progress and certifications. The admin can assign a moderator for each group, and the moderator will be able to monitor the learners' progress. Let's ...
    • Create chapter API

      Description: To create a chapter under a course in academy Request URL: /api/v4/<orgId>/sections.json (How do I get my orgId?) Method: POST OAuth scope: TrainerCentral.sectionapi.CREATE Parameters: { "section":{ "courseId": "<courseId>", "name": ...
    • Create course API

      Description: To create a new course in an academy. Request URL: /api/v4/<orgId>/courses.json (How do I get my OrgId?) Method: POST OAuth scope: TrainerCentral.courseapi.CREATE Paramaters { "course":{ "courseName":"<courseName>", ...
    • Create lesson API

      Description: To create a lesson under a course in an academy. Request URL: /api/v4/<orgId>/sessions.json (How do I get my orgId?) Method: POST OAuth scope: TrainerCentral.sessionapi.CREATE Parameters for creating an on-demand lesson { "session":{ ...