Expand description
The mock’s half of the moocfi endpoints: its own request and response shapes, deliberately not shared with the client so the two can disagree the way a real Suotar and our client can.
Every endpoint takes a top-level JSON array and answers with one item per request item, in order.
Per-item outcomes are HTTP 200; only request-level failures are 4xx/5xx. Suotar serializes an
undefined field by leaving it out and a null one as null, and the response structs keep
that distinction field by field.
Structs§
- Attainment
Reference - Attainment
Summary - The seven fields
duplicateAttainmentandnotImprovedAttainmentreport. - Course
Allowed Result - Course
Code Request Item - Shared by list-by-course and course-code validation, which both take only a code.
- Credit
Range - Date
Period - Duplicate
Attainment Result - Enrolment
- Enrolment
Resolution Result - Enrolments
Listed Result - Existing
Attainment - The importer’s attainment passed through: a course-unit attainment has no assessment item or
realisation, and a missing grade leaves
passedout. - Existing
Attainments Result - What
enrolmentNotFoundandenrolmentNotAcceptedstill hand back. - Import
Attainment Request Item - Item
Error - Listed
Enrolment - Listed
Person - Localized
Name - NotImproved
Attainment Result - Person
Result - Exactly the four keys Suotar passes on from the importer’s person row.
- Recently
Sent Attainment - The five fields of the
duplicateAttainmentSuotar answers from its own recent sends, which names the submission rather than anything the importer has seen. - Recently
Sent Duplicate Result - Registered
Result - Request
Level Error - Request
Level Error Body - Resolve
Enrolment Request Item - Resolve
Person Request Item - Response
Item - A request’s items are all one endpoint’s shape, but the pipeline also carries fault-shaped items and logs them, so the result is erased to JSON as soon as the logic has built it.
- Submission
Pending Result - Submitted
Attainment - Verify
Attainment Request Item
Enums§
- Endpoint
- The moocfi endpoints, keyed the way the audited client names them.
- Item
Status
Constants§
Functions§
- canonical_
message 🔒 - Suotar’s fixed wording per code,
endpointbeingNonefor a request-level one. Codes whose real message names the item fall back to a generic sentence here, for a fault that names the code without a message. - iso_
millis - JavaScript’s
toISOString(): UTC with exactly three fractional digits. - number_
when_ 🔒numeric - sisu_
midnight - A date the way the importer passes Sisu’s through: an instant at UTC midnight.