Query Parameter | Description |
ak | This is your Public-API-Key, which Mettl uses to identify your account. |
ts | This is the current UNIX or Epoch Timestamp (the number of seconds between 1970-01-01 00:00:00 and current UTC Time). Any current generated Timestamp will be valid for 24 hours only. |
asgn | This is a unique Signature which has to be generated for each API request. The Signature is generated by creating a String-to-Sign and hashing it with your Private-API-Key using the HMAC-SHA256 (for version v2 and v3) or HMAC-SHA1 (for v1) hashing algorithm with Base-64 and URL encoding. Read more about the above Signature Generation Process in API Authentication and Signature Generation . |
assessments | This is a JSON string containing the details of the assessment to be created. The format for the JSON is given below |
Property | Sub Property | Sub Property | Description |
name | Name of the assessment. This string is always mandatory and has to be unique for each assessment in your account. | ||
duration | Duration of the assessment in minutes. This integer is only mandatory when each section does not have its own duration and should be more than 0. | ||
instructions | Instructions shown before and during the assessment. This string is optional and accepts HTML tags as well with the default value being blank. | ||
allowCopyPaste | Determines whether copy and paste is allowed in the assessment. This boolean is optional and is false by default. | ||
exitRedirectionURL | Link or URL to redirect the test-taker after assessment finishes. This string is optional and is blank by default. | ||
showReportToCandidateOnExit | Determines whether the report is shown to the test-taker after assessment finishes. This boolean is optional and is false by default. | ||
onScreenCalculator | Determines whether an on-screen scientific calculator is available to test-taker during the assessment. This boolean is optional and is false by default. | ||
sections | Sections in the assessment. This list of nested JSON(s) is always mandatory. | ||
↳ | name | Name of a section in the assessment. This string is always mandatory. | |
↳ | duration | Duration of a section in the assessment in minutes. This integer is only mandatory when the assessment does not have its own duration and should be more than 0. | |
↳ | instructions | Instructions of a section shown during the assessment. This string is optional and is blank by default. | |
↳ | allQuestionsMandatory | Determines whether all questions in a section are mandatory. This boolean is optional and is false by default. | |
↳ | randomizeQuestions | Determines whether questions will be randomly selected from the skills in a section. This boolean is optional and is false by default. | |
↳ | skills | Skills to be added to a section of the assessment. This list of nested JSON(s) is always mandatory. | |
↳ | name | Name of the skill to be added to a section. This string is always mandatory and only accepts the names of the skills already added in your question bank. | |
↳ | level | Difficulty level of questions in the skill to be added to a section. This string is always mandatory and only accepts the levels available in the skill, i.e., either "easy", "medium" or "difficult". | |
↳ | questionCount | Number of questions in the skill to be added to a section. This integer is always mandatory and should be more than 0 but less than or equal to the number of questions with the given difficulty level and question types in the added skill . | |
↳ | questionPooling | Determines whether questions will be randomly selected from the skill. This boolean is optional and is false by default. | |
↳ | questionType | Type of questions in the skill to be added to a section. This string is optional and only accepts the question types available in the skill, i.e., either "AllType", "MCQ", "MCA", "SHORT_ANSWER", "FITB", "LONG_ANSWER", "CODE", "SQL", "CS", "CP", "FES", "TS" or "FU" with the default value being "AllType". | |
↳ | correctGrade | Marks awarded for correctly answering a question. This floating point decimal number is always mandatory and should be more than 0. | |
↳ | incorrectGrade | Marks deducted for incorrectly answering a question. This floating point decimal number is optional and should be less than or equal to 0 with the default value being 0. |