Expand description
Wire types for the exercise-services client API (/api/v0/exercise-services/client), the
HTTP surface a native client authenticates against and exchanges for course, exercise,
and submission data. Consumed externally by tmc-langs-rust, so it stays free of
server-internal dependencies; the openapi feature adds utoipa::ToSchema derives for the
server’s own OpenAPI generation and is off by default for other consumers.
Structs§
- Answer
File - A file the host stored on a client’s behalf. The host assigns
id; a client never invents one. Returned by the upload endpoint and echoed back by submission download. - Course
- A course the current user can browse or is enrolled in.
- Course
Progress - The current user’s progress across every exercise they can see in a course, returned
by
courses/{id}/progressin a single round-trip. Course-level totals are not sent separately; the client derives them by summing overexercises(e.g. total awarded =sum(score_given), total available =sum(score_maximum)). - Exercise
Progress - The current user’s progress on a single exercise.
- Exercise
Slide - One selected slide of an exercise, carrying only the tasks whose exercise service can serve
the requesting client. An exercise with no client-servable task is omitted entirely by
endpoints that return this type, rather than appearing with an empty
tasks. - Exercise
Slide Submission - Body of
POST exercises/{id}/submit. Plain JSON — no file parts, no archive: the previously uploaded files named here are the answer. - Exercise
Slide Submission List Item - A past submission of the current user to an exercise.
idis the exercise-slide-submission id, which is whatsubmissions/{id}/downloadtakes. - Exercise
Task - One task of an exercise slide, as produced by a specific exercise service.
- Exercise
Task Submission Result - Result of a submit. Carries both ids so a client never re-derives one from the other:
grading polling takes
task_submission_id, download/share takeslide_submission_id. - Paste
Result - A shareable URL for a submission.
- Submission
Files - Response of
GET submissions/{id}/download: the files the submission was made from, recovered from the host’s own file records rather than from the service’s answer. - Uploaded
Files - Response of
POST exercises/{id}/files, in the same order as the request’s parts.
Enums§
- Answer
Kind - Which of the two representations an answer is: the JSON in
data_json, or the files indata_files. A request that omits it meansJson. - Exercise
Task Submission Status - The grading status of a task submission, as polled after
submit. - Grading
Progress - How far along a task submission’s grading is.
Type Aliases§
- Token
- The token exchanged at the OAuth2 token endpoint; its
access_tokenis the bearer token sent with every other request in this API.