Download OpenAPI specification:Download
This document describes the RESTful API that eTutor Task apps must comply with in order for task creation to work with eTutor Task-Administration. Task apps may have additional endpoints that can be called by the task administration UI. The task administration server will forward the requests from the UI to the task app.
Authentication is performed using API keys. Different API keys may have different roles:
Returns the task group type specific data of the requested task group. This is used by the task administration to retrieve the form values for editing the task group. Requires the CRUD
role.
id required | integer <int64> The task group identifier. |
{- "ddl": "CREATE TABLE test (id INTEGER);"
}
Creates a new task group. The new task group is stored under the specified identifier. Requires the CRUD
role.
id required | integer <int64> The task group identifier. |
Task group data
taskGroupType required | string [ 2 .. 100 ] characters The task group type. If a task app supports more than one task group type, this can be used to distinguish between types. |
status required | string Enum: "DRAFT" "READY_FOR_APPROVAL" "APPROVED" The task group status. |
required | object The task group type specific data. The content of this object depends on the task group type. |
{- "taskGroupType": "sql",
- "status": "DRAFT",
- "additionalData": {
- "ddl": "CREATE TABLE test (id INTEGER);"
}
}
{- "descriptionDe": "Gesucht ist eine Zahl zwischen 1 und 10.",
- "descriptionEn": "We are looking for a number between 1 and 10."
}
Updates an existing task group. Requires the CRUD
role.
id required | integer <int64> The task group identifier. |
Task group data
taskGroupType required | string [ 2 .. 100 ] characters The task group type. If a task app supports more than one task group type, this can be used to distinguish between types. |
status required | string Enum: "DRAFT" "READY_FOR_APPROVAL" "APPROVED" The task group status. |
required | object The task group type specific data. The content of this object depends on the task group type. |
{- "taskGroupType": "sql",
- "status": "DRAFT",
- "additionalData": {
- "ddl": "CREATE TABLE test (id INTEGER);"
}
}
{- "descriptionDe": "Gesucht ist eine Zahl zwischen 1 und 10.",
- "descriptionEn": "We are looking for a number between 1 and 10."
}
Returns the task type specific data of the requested task. This is used by the task administration to retrieve the form values for editing the task. Requires the CRUD
role.
id required | integer <int64> The task identifier. |
{- "solution": "SELECT id FROM student;"
}
Creates a new task. The new task is stored under the specified identifier. Requires the CRUD
role.
id required | integer <int64> The task identifier. |
Task data
taskGroupId | integer <int64> The task group identifier, if applicable. |
maxPoints required | number The maximum achievable points. |
taskType required | string [ 2 .. 100 ] characters The task type. If a task app supports more than one task type, this can be used to distinguish between types. |
status required | string Enum: "DRAFT" "READY_FOR_APPROVAL" "APPROVED" The task status. |
required | object The task type specific data. The content of this object depends on the task type. |
{- "taskGroupId": 445,
- "maxPoints": 10.5,
- "taskType": "sql",
- "status": "DRAFT",
- "additionalData": {
- "solution": "SELECT id FROM student;"
}
}
{- "descriptionDe": "Geben Sie eine Zahl ein.",
- "descriptionEn": "Enter a number.",
- "difficulty": 2,
- "maxPoints": 25.75
}
Updates an existing task. Requires the CRUD
role.
id required | integer <int64> The task identifier. |
Task data
taskGroupId | integer <int64> The task group identifier, if applicable. |
maxPoints required | number The maximum achievable points. |
taskType required | string [ 2 .. 100 ] characters The task type. If a task app supports more than one task type, this can be used to distinguish between types. |
status required | string Enum: "DRAFT" "READY_FOR_APPROVAL" "APPROVED" The task status. |
required | object The task type specific data. The content of this object depends on the task type. |
{- "taskGroupId": 445,
- "maxPoints": 10.5,
- "taskType": "sql",
- "status": "DRAFT",
- "additionalData": {
- "solution": "SELECT id FROM student;"
}
}
{- "descriptionDe": "Geben Sie eine Zahl ein.",
- "descriptionEn": "Enter a number.",
- "difficulty": 2,
- "maxPoints": 25.75
}
Returns a paged and filtered list of submissions. Requires the READ_SUBMISSION
role.
page | integer >= 0 Default: 0 Zero-based page index (0..N) |
size | integer >= 1 Default: 20 The size of the page to be returned |
sort | Array of strings Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. |
userFilter | string Default: null Example: userFilter=k1234567 User filter string (applies equals to userId). |
taskFilter | integer <int64> Default: null Example: taskFilter=109 Task filter string (applies equals to taskId). |
assignmentFilter | string Default: null Example: assignmentFilter=moodle_quiz_10 Assignment filter string (applies equals to assignmentId). |
modeFilter | string Enum: "RUN" "DIAGNOSE" "SUBMIT" Submission mode filter string (applies equals to mode). |
{- "totalElements": 35,
- "totalPages": 4,
- "size": 10,
- "number": 3,
- "numberOfElements": 5,
- "content": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "userId": "k12212345",
- "assignmentId": "moodle_quiz_3",
- "taskId": 7789,
- "submissionTime": "2019-08-24T14:15:22Z",
- "language": "st",
- "feedbackLevel": 3,
- "mode": "RUN",
- "evaluationResult": {
- "maxPoints": 10.5,
- "points": 7.5,
- "generalFeedback": "<p>Your solution is correct.</p>",
- "criteria": [
- {
- "name": "Syntax",
- "points": 1.5,
- "passed": true,
- "feedback": "<p>You are missing a semicolon at the end of your statement.</p>"
}
]
}, - "submission": {
- "solution": "SELECT * FROM student;"
}
}
]
}
Executes and grades a submission. If runInBackground
is true
, only the submission identifier will be returned; otherwise the evaluation result will be returned. Requires the SUBMIT
role.
runInBackground | boolean Default: false Whether to run the grading in background or wait for grading to finish. |
persist | boolean Default: true Whether to persist the submission. Only applies if |
The submission data.
userId | string [ 0 .. 255 ] characters The user identifier (can be used e.g. for plagiarism check). |
assignmentId | string [ 0 .. 255 ] characters The assignment identifier (can be used e.g. for plagiarism check). |
taskId required | integer <int64> The task identifier. |
language required | string = 2 characters de|en The user interface language. The feedback should be returned in the requested language. |
mode required | string Enum: "RUN" "DIAGNOSE" "SUBMIT" The submission mode. Might be expanded in future releases. |
feedbackLevel required | integer <int32> [ 0 .. 3 ] The feedback level. |
required | object The submission of the user. If the submission consists only of a string, then this object should contain a single property with the key |
{- "userId": "k12212345",
- "assignmentId": "moodle_quiz_3",
- "taskId": 8911,
- "language": "st",
- "mode": "RUN",
- "feedbackLevel": 3,
- "submission": {
- "input": "SELECT * FROM student;"
}
}
{- "submissionId": "23243110-f447-42f4-a433-27cb8d276b19",
- "grading": {
- "maxPoints": 10.5,
- "points": 7.5,
- "generalFeedback": "<p>Your solution is correct.</p>",
- "criteria": [
- {
- "name": "Syntax",
- "points": 1.5,
- "passed": true,
- "feedback": "<p>You are missing a semicolon at the end of your statement.</p>"
}
]
}
}
Returns the evaluation result for the requested submission. Waits for the specified timeout for the result to be available. Requires the SUBMIT
role.
id required | string <uuid> The submission identifier. |
delete | boolean Default: false Whether to delete the submission after retrieval. |
X-API-TIMEOUT | integer <int32> Default: 10 The maximum amount of seconds to wait for the result. |
{- "maxPoints": 10.5,
- "points": 7.5,
- "generalFeedback": "<p>Your solution is correct.</p>",
- "criteria": [
- {
- "name": "Syntax",
- "points": 1.5,
- "passed": true,
- "feedback": "<p>You are missing a semicolon at the end of your statement.</p>"
}
]
}
Returns some information about the application. Requires the CRUD
role. This is an optional endpoint.
{- "git": {
- "dirty": true,
- "branch": "main",
- "commit": {
- "id": {
- "abbrev": "060b9f6",
- "full": "060b9f638044f8c1e46de002f5bc287beaecc56d"
}, - "time": "2019-08-24T14:15:22Z"
}
}, - "build": {
- "version": "1.1.0",
- "time": "2019-08-24T14:15:22Z",
- "name": "eTutor Task-App"
}, - "os": {
- "name": "Linux",
- "version": "6.6.16-linuxkit",
- "arch": "aarch64"
}
}
Returns the health information of the application. This is a required endpoint. If not authenticated, the server should only return the "status"-property. If authenticated, the server may also return health details of the components.
{- "status": "UP",
- "components": {
- "property1": {
- "status": "UP",
- "details": { },
- "components": {
- "property1": { },
- "property2": { }
}
}, - "property2": {
- "status": "UP",
- "details": { },
- "components": {
- "property1": { },
- "property2": { }
}
}
}
}