API Endpoints
We provide a set of RESTful APIs to interact with each module of the Intelligent Tutoring System (ITS), so that ITS can be easily integrated and customized with any teaching system/platform. This page includes the API documentation for the Intelligent Tutoring System (ITS) for Programming and Algorithms Education.
To access demo API endpoints or apply for a local deployment at your institution, please contact us for support.
Parser API
The ITS parser generate parsed result of input source code in ITS intermediate representation.
Request Format:
- language: A string representing the programming language of the source code. The API supports "c", "python", or "java".
- source_code: A string containing the source code that needs to be processed.
Example Request Body:
1 2 3 4 |
|
Response:
Intermediate representation of the input source code in JSON format.
Example Successful Response:
The below JSON response is an example of the intermediate representation of the input source code in JSON format.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 |
|
Structural Alignment API
Request Format:
- reference_solution: A list of string containing the response of the Parser API for the reference solutions.
- student_solution: A string containing the response of the Parser API for the student solution.
Example Request Body:
1 2 3 4 |
|
Response:
The structural alignment result of the reference and student solutions in JSON format. This structure alignment result is used to identify the matching basic blocks for each function inside the reference and student solutions.
Along with the variable alignment result, they are used to pinpoint the equivalent program specifications at function level for each function inside the reference and student solutions.
Example Successful Response:
The below JSON response is an example of structural alignment result of the computeDeriv
function in the reference and student solutions in JSON format.
1 2 3 4 5 6 7 8 9 10 |
|
Variable Alignment API
Request Format:
- reference_solution: A list of string containing the response of the Parser API for the reference solutions.
- student_solution: A string containing the response of the Parser API for the student solution.
- structural_alignment: string (structural alignment result)
Example Request Body:
1 2 3 4 5 |
|
Response:
The variable alignment result of the reference and student solutions in JSON format. This variable alignment result is used to identify the matching variables for each function inside the reference and student solutions.
Along with the structural alignment result, they are used to pinpoint the equivalent program specifications at function level for each function inside the reference and student solutions.
Example Successful Response:
The below JSON response is an example of variable alignment result of the computeDeriv
function in the reference and student solutions in JSON format.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 |
|
Error Localizer and Interpreter API
Request Format:
- language: A string representing the programming language of the source code. The API supports "c", "python", or "java".
- reference_solution: A list of string containing the response of the Parser API for the reference solutions.
- student_solution: A string containing the response of the Parser API for the student solution.
- function: A string represents entry function name of the programming assignment.
- inputs: A string represents IO inputs of the programs.
- args: A string represent argument inputs of the entry function.
Example Request Body:
1 2 3 4 5 6 7 8 |
|
Response:
The response contains the identified error locations of the reference and student solutions in JSON format.
Example Successful Response:
The below JSON response is an example of identified error location of the is_odd
function in the reference and student solutions in JSON format.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 |
|
Repair Engines API
Request Format:
- language: A string representing the programming language of the source code. The API supports "c", "python", or "java".
- reference_solution: A list of string containing the response of the Parser API for the reference solutions.
- student_solution: A string containing the response of the Parser API for the student solution.
- function: A string represents entry function name of the programming assignment.
- inputs: A string represents IO inputs of the programs.
- args: A string represent argument inputs of the entry function.
Example Request Body:
1 2 3 4 5 6 7 8 |
|
Response:
The response contains the program patch generated by the repair engine to fix the student submission in JSON format.
Example Successful Response:
1 2 3 4 5 6 7 8 9 10 |
|
Feedback Generators API
Request Format:
- prob_desc: A string representing the problem description of the programming assignment.
- student_solution: A string containing the response of the Parser API for the student solution.
- repair: A string containing the response of the Repair Engines API for the student solution.
Example Request Format:
1 2 3 4 5 |
|
Response: The response contains the feedback generated by the Generative AI models in the feedback generator for the student solution in JSON format.
Example Successful Response:
1 2 3 4 5 6 7 8 |
|