List the lessons of a course.

Open in ChatGPT Open in ChatGPT to ask questions about this page
Open in Claude Open in Claude to ask questions about this page
Copy as MarkdownCopy this page as markdown to use with AI assistants
View as Markdown Open this page as markdown in a new tab

Returns all lessons of a course, including drafts, with their occurrence (talks) and settings records. Send limit to paginate from si; meta.sessionsCount gives the total when si is 0.

Endpoint

get https://{TrainerCentral-API-Domain}/tc/api/v1/trainer/course/{courseId}/sessions.json

OAuth Scope

TrainerCentral.sessionapi.READCopied!

Headers

tc-orgIdstring(Required)

ID of the academy (orgId).

Example
51517414

Path Parameters

courseIdstring(Required)

ID of the course.

Query Parameters

siinteger(Optional)

Start index for pagination, used with limit. Default 0.

Example
0
limitinteger(Optional)

Maximum lessons to return. When omitted, all lessons are returned. Min 1.

Example
20

Request Example

cURL
cURL
Java
Python
Deluge
Copied!
curl --request GET \
  --url 'https://trainercentral.zoho.com/tc/api/v1/trainer/course/{courseId}/sessions.json?si=0&limit=20' \
  --header 'Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52' \
  --header 'tc-orgId: 51517414'

Response Parameters

sessionsJSON Array

Lessons of the course, including drafts.

Hide Sub-Attributes
JSON Object
Show Sub-Attributes
sessionIdstring

ID of the lesson (sessionId).

idstring

Same as sessionId.

namestring

Name of the lesson.

descriptionstring

Description of the lesson. Supports rich text.

deliveryModestring

Lesson type. Allowed: 3=Live session, 4=On-demand lesson, 7=Assignment.

sessionIndexstring

Zero-based position of the lesson in its chapter.

sectionIdstring

ID of the chapter (section) that holds the lesson.

courseIdstring

ID of the course the lesson belongs to.

orgIdstring

ID of the academy (orgId).

enableDraftstring

true when the lesson is a draft, hidden from learners.

enablePrerequisitestring

true when learners must complete this lesson before later lessons.

publishStatusstring

Publish status of the lesson. Allowed: 0=Unpublished, 1=Published.

scheduledTimestring

Live lessons only. Start time in epoch milliseconds.

scheduledEndTimestring

Live lessons only. End time in epoch milliseconds.

timezonestring

Live lessons only. IANA time zone, for example Asia/Kolkata.

scheduleTypestring

Schedule type. Allowed: 0=One-time, 1=Recurring. Always 0 for lessons.

kindstring

Visibility. Allowed: 0=Default, 1=Featured.

scheduledBystring

User ID of the trainer who created the lesson.

coursestring

Same as courseId.

createdTimestring

Creation time in epoch milliseconds.

talksJSON Array

Occurrence records of the listed lessons, matched by sessionId.

Hide Sub-Attributes
JSON Object
Show Sub-Attributes
talkIdstring

ID of the occurrence (talkId).

namestring

Name of the occurrence.

sessionIdstring

ID of the live session.

orgIdstring

ID of the academy (orgId).

statusstring

Status of the occurrence. Allowed: 0=Yet to start, 1=Scheduled, 2=Projected, 3=Started, 4=Suspended, 5=Completed, 6=Orphaned, 7=Cancelled.

registeredCountstring

Number of registered learners.

scheduledTimestring

Start time in epoch milliseconds.

scheduledEndTimestring

End time in epoch milliseconds.

deliveryModestring

Delivery mode. Allowed: 3=Live session, 4=On-demand, 7=Assignment.

idstring

Same as talkId.

ownerstring

User ID of the trainer who owns the occurrence.

sessionSettingsarray

Settings records of the listed lessons.

talkPresentersDetailsarray

Presenters of completed live occurrences.

metaJSON Object

Lesson count. Returned when limit is sent and si is 0.

Hide Sub-Attributes
sessionsCountstring

Total number of lessons. Returned when limit is sent and si is 0.

errorJSON Object

Error details.

Hide Sub-Attributes
codestring

Deprecated numeric error code (for example ST_202). Prefer codeStr; omitted from doc samples.

codeStrstring

Error code name (ShowtimeErrorCode / err_code_str), for example MISSING_PARAMETER.

messagestring

Error message.

Possible Error Codes

HTTP CodeError CodeDescription
500ST_94

INVALID_COURSE - The courseId does not match a course in this academy, or the course is deleted. Pass a valid courseId. Do not retry unchanged.

ST_102

UNAUTHORISED_ACCESS - The user is not an academy owner or admin, or an admin or trainer of this course. Call with one of these roles; do not retry unchanged.

Response Example

First page of lessons (si=0, limit=20).

200
200
400
500
Copied!
  {
    "sessions": [
      {
        "sessionId": "3000000000040",
        "id": "3000000000040",
        "name": "Python Basics - Variables",
        "courseId": "3000000000022",
        "sectionId": "3000000000026",
        "sessionIndex": "0",
        "deliveryMode": "4",
        "enableDraft": "false",
        "enablePrerequisite": "false",
        "publishStatus": "1",
        "orgId": "51517414"
      },
      {
        "sessionId": "3000000000045",
        "id": "3000000000045",
        "name": "Live Doubt Clearing",
        "courseId": "3000000000022",
        "sectionId": "3000000000026",
        "sessionIndex": "1",
        "deliveryMode": "3",
        "scheduledTime": "1800419400000",
        "scheduledEndTime": "1800423000000",
        "timezone": "Asia/Kolkata",
        "enableDraft": "true",
        "enablePrerequisite": "false",
        "publishStatus": "0",
        "orgId": "51517414"
      }
    ],
    "talks": [
      {
        "talkId": "3000000000046",
        "id": "3000000000046",
        "sessionId": "3000000000045",
        "name": "Live Doubt Clearing",
        "status": "1",
        "deliveryMode": "3",
        "scheduledTime": "1800419400000",
        "scheduledEndTime": "1800423000000"
      }
    ],
    "sessionSettings": [],
    "meta": {
      "sessionsCount": "2"
    }
  }
                
  {
    "error": {
      "code": "string",
      "codeStr": "string",
      "message": "string"
    }
  }
                
500 Request failed; see the error code.
▼ Show full

Rate Limits

Duration1 minute
Threshold50
Lock Period1 minute

Duration - Time window for the threshold.
Threshold - Number of API calls allowed within the specified duration.
Lock Period - Wait time before consecutive API requests.