List the tests in 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 every test in a course with its settings; not paginated. id is the test id, and the part of formId before the underscore is the form UUID used by the form and question APIs.

Endpoint

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

OAuth Scope

TrainerCentral.courseapi.READCopied!

Headers

tc-orgIdstring(Required)

ID of the academy (orgId).

Example
51517414

Path Parameters

courseIdlong(Required)

ID of the course.

Example
21603000000092046

Request Example

cURL
cURL
Java
Python
Deluge
Copied!
curl --request GET \
  --url https://trainercentral.zoho.com/tc/api/v1/trainer/course/21603000000092046/tests.json \
  --header 'Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52' \
  --header 'tc-orgId: 51517414'

Response Parameters

testsJSON Array

Tests of the course; not paginated.

Hide Sub-Attributes
JSON Object
Show Sub-Attributes
idstring

Test id (not the form UUID).

formIdstring

Test form id (formUuid_talkId); the part before the underscore is the form UUID.

formstring

Same as formId.

namestring

Name of the test.

descriptionstring

Instructions shown before the test. Supports rich text.

sessionIdstring

ID of the lesson (sessionId) that holds the test.

sessionstring

Same as sessionId.

talkIdstring

ID of the lesson occurrence (talkId) that holds the test.

talkstring

Same as talkId.

totalQuestionsstring

Number of questions in the test.

enableGradingstring

true when attempts are graded pass or fail.

gradingPercentagestring

Pass mark as a percentage of the total score.

enableRetakestring

true when learners can retake the test.

attemptsCountstring

Retakes allowed after the first attempt; 0 when retakes are off.

allowRetakeAllowTypestring

Who may retake when grading is on. Allowed: 1=All learners, 3=Passed only, 4=Failed only.

testResultAllowTypestring

Who sees the result. Allowed: 0=Default (hidden), 1=All learners, 2=No one, 3=Passed only, 4=Failed only.

testScoreAllowTypestring

Who sees the score. Allowed: 0=Default (hidden), 1=All learners, 2=No one, 3=Passed only, 4=Failed only.

learnersAnswerAllowTypestring

Who sees their own answers. Allowed: 0=Default (hidden), 1=All learners, 2=No one, 3=Passed only, 4=Failed only.

correctOrIncorrectAllowTypestring

Who sees whether each answer was correct. Allowed: 0=Default (hidden), 1=All learners, 2=No one, 3=Passed only, 4=Failed only.

correctAnswerAllowTypestring

Who sees the correct answers. Allowed: 0=Default (hidden), 1=All learners, 2=No one, 3=Passed only, 4=Failed only.

answerFeedbackAllowTypestring

Who sees the question feedback. Allowed: 0=Default (hidden), 1=All learners, 2=No one, 3=Passed only, 4=Failed only.

enableShowResultstring

Legacy flag; true when testResultAllowType is 1.

enableShowCorrectAnswerstring

Legacy flag; true when testResultAllowType and learnersAnswerAllowType are 1.

enableShuffleQuestionstring

true when questions are shuffled.

shuffleLimitstring

Questions picked at random per attempt.

enableShuffleAnswerOptionstring

true when Choice options are shuffled.

enableNegativeMarkstring

true when marks are deducted for wrong answers.

negativeMarkstring

Marks or percent deducted per wrong answer.

negativeMarkTypestring

How negativeMark applies. Allowed: 0=Points, 1=Percentage.

enableTimedTeststring

true when each attempt has a time limit.

durationstring

Time limit per attempt in minutes.

graceTimeForEndTeststring

Grace time in seconds after the time limit; always 10.

allowLearnersToChangeAnswerOnceSubmittedstring

true when learners can change a submitted answer.

showFeedbackForEachQuestionAfterAnsweringstring

true when feedback is shown after each answer.

customEndMessagestring

Message displayed when the assessment ends. Supports rich text.

passGradeMessagestring

Message displayed to learners when they pass the assessment. Supports rich text.

failGradeMessagestring

Message displayed to learners when they fail the assessment. Supports rich text.

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 is not a course in this academy, or it is deleted. Pass a valid courseId; do not retry unchanged.

ST_102

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

Response Example

One graded test with two retakes.

200
200
400
500
Copied!
  {
    "tests": [
      {
        "id": "59f7b492-b1d4-4573-a4d2-54a957fb6c50",
        "formId": "ccba4295-e247-4ead-9519-ccd8ba1924da_21603000000092053",
        "form": "ccba4295-e247-4ead-9519-ccd8ba1924da_21603000000092053",
        "name": "Business Fundamentals Quiz",
        "description": "<p>Answer all questions.</p>",
        "sessionId": "21603000000092051",
        "session": "21603000000092051",
        "talkId": "21603000000092053",
        "talk": "21603000000092053",
        "totalQuestions": "5",
        "enableGrading": "true",
        "gradingPercentage": "50",
        "enableRetake": "true",
        "attemptsCount": "2",
        "allowRetakeAllowType": "4",
        "testResultAllowType": "1",
        "testScoreAllowType": "1",
        "learnersAnswerAllowType": "3",
        "correctOrIncorrectAllowType": "3",
        "correctAnswerAllowType": "3",
        "answerFeedbackAllowType": "0",
        "enableShowResult": "true",
        "enableShowCorrectAnswer": "false",
        "enableShuffleQuestion": "false",
        "shuffleLimit": "0",
        "enableShuffleAnswerOption": "false",
        "enableNegativeMark": "false",
        "enableTimedTest": "false",
        "graceTimeForEndTest": "10",
        "allowLearnersToChangeAnswerOnceSubmitted": "true",
        "showFeedbackForEachQuestionAfterAnswering": "false",
        "customEndMessage": "",
        "passGradeMessage": "Well done!",
        "failGradeMessage": "Review the lesson and try again."
      }
    ]
  }
                
  {
    "error": {
      "code": "string",
      "codeStr": "string",
      "message": "string"
    }
  }
                
500 Request failed; see the error code.
▼ Show full

Rate Limits

Duration1 minute
Threshold20

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