Courses
Create, get, modify, and delete courses.
GET /courses
Returns a paginated list of all courses, including metadata such as stage count, assignee count, and completion percentage. Supports filtering and sorting.
Query Parameters
- page — Optional — integer
-
Specifies the page number for paginated results. Starts at 1. Defaults to 1.
- pageSize — Optional — integer
-
Maximum number of courses to return per page. Defaults to 30.
- direction — Optional — string
-
The direction to sort the courses. Must be either "ASC" or "DESC". Defaults to "ASC".
- orderby — Optional — string
-
The field to sort the courses by. Allowed values: "title", "status", "stages_count", "modified_date", "assignee_count", "completion_percentage". Defaults to "title".
- query — Optional — string
-
The query to search for. The search will be applied to the course title.
- disabledOkay — Optional — boolean
-
Whether to include disabled courses in the results.
- userid — Optional — integer
-
The userid to filter the courses by.
Response
Status: 200 Ok
{ "courses": [ { "url": "\/Courses\/View\/39", "fullUrl": "https:\/\/www.dozuki.dev\/Courses\/View\/39", "wikiid": 39, "langid": "en", "namespace": "COURSE", "title": "A course to test percentages without restructure", "revisionid": 210, "contents_raw": "bogussss", "contents_json": { "type": "doc", "content": [ { "type": "paragraph", "content": [ { "type": "text", "text": "bogussss" } ] } ] }, "contents_rendered": "<p>bogussss<\/p>", "can_edit": true, "author": { "userid": 3, "banned": null, "username": "admin", "unique_username": null, "join_date": 1539302493, "image": { "id": 37, "guid": "moVbFARMO2CJCGWU", "mini": "https:\/\/www.dozuki.dev\/igi\/ioliveira\/moVbFARMO2CJCGWU.mini", "thumbnail": "https:\/\/www.dozuki.dev\/igi\/ioliveira\/moVbFARMO2CJCGWU.thumbnail", "140x105": "https:\/\/www.dozuki.dev\/igi\/ioliveira\/moVbFARMO2CJCGWU.140x105", "200x150": "https:\/\/www.dozuki.dev\/igi\/ioliveira\/moVbFARMO2CJCGWU.200x150", "standard": "https:\/\/www.dozuki.dev\/igi\/ioliveira\/moVbFARMO2CJCGWU.standard", "440x330": "https:\/\/www.dozuki.dev\/igi\/ioliveira\/moVbFARMO2CJCGWU.440x330", "medium": "https:\/\/www.dozuki.dev\/igi\/ioliveira\/moVbFARMO2CJCGWU.medium", "large": "https:\/\/www.dozuki.dev\/igi\/ioliveira\/moVbFARMO2CJCGWU.large", "huge": "https:\/\/www.dozuki.dev\/igi\/ioliveira\/moVbFARMO2CJCGWU.huge" }, "reputation": 1, "url": "https:\/\/www.dozuki.dev\/User\/3\/standard-user", "teams": [ 1, 14 ], "enabled": true }, "flags": [], "image": null, "documents": [], "modified_date": 1742912701, "publish_date": null, "created_date": 1737058255, "viewUrl": "\/Courses\/View\/39", "status": "Enabled", "assigneeCount": 1, "stages_count": 4, "completion_percentage": 5, "assignees": [ { "userid": 3, "course_assignmentid": 222, "username": "standard-user", "image": "https:\/\/www.dozuki.dev\/static\/images\/avatars\/User\/Dozuki\/single-avatar-2-02.thumbnail", "completionTotal": 0 } ] } ] }
GET /courses/{wikiid}
Fetch an existing course's information. The assignees, assignee count, and completion information is only included if the user has access to that information.
Route Parameters
- wikiid — Required — integer
-
Identifier for course being edited.
Response
Status: 200 Ok
{ "wikiid": 174, "langid": "en", "namespace": "COURSE", "title": "Machinist - Level 1", "revisionid": 460, "contents_raw": "The introduction course for machinist.", "contents_json": { "type": "doc", "content": [ { "type": "paragraph", "content": [ { "type": "text", "text": "The introduction course for machinist." } ] } ] }, "contents_rendered": "<p>The introduction course for machinist.<\/p>", "can_edit": true, "author": { "userid": 1, "banned": null, "username": "admin", "unique_username": null, "join_date": 1539302493, "image": null, "reputation": 200, "url": "https:\/\/site.com\/User\/1", "teams": [], "enabled": true }, "flags": [], "image": null, "documents": [], "publish_date": 1539241200, "created_date": 1539302493, "modified_date": null, "enabled": 1, "stages": [ { "course_stageid": 72, "docid": 2, "doctype": "guide", "doc_url": "\/Guide\/How+to+Calibrate+WIPS\/2", "orderby": 0, "strictness": "major", "title": "How to Calibrate WIPS", "frequency_quantity": 6, "frequency_unit": "month", "completion": null }, { "course_stageid": 73, "docid": 35, "doctype": "guide", "doc_url": "\/Guide\/CNC+Machine+Operation\/35", "orderby": 1, "strictness": "minor", "title": "CNC Machine Operation", "frequency_quantity": null, "frequency_unit": null, "completion": null }, { "course_stageid": 74, "docid": 37, "doctype": "guide", "doc_url": "\/Guide\/How+to+Set+Up+and+Use+the+Roll+Form+Machine\/37", "orderby": 2, "strictness": null, "title": "How to Set Up and Use the Roll Form Machine", "frequency_quantity": null, "frequency_unit": null, "completion": null } ], "assigneeCount": 18, "assignees": null, "completionPercent": 0, "viewUrl": "\/Courses\/View\/174" }
POST /courses
Create a new course.
Request Body
- title — Required — string
-
Title of course.
- contents — Required — string
-
Description of course.
- publish_date — Optional — integer
-
Unix timestamp for publish date of course.
- enabled — Optional — boolean
-
Toggle for enabling/disabling a course. A disabled course cannot be assigned or completed.
- stages — Optional — array of objects
-
List of stages in a course.
- docid— Required integer. The docid for the stage guide/wiki.
- doctype— Requires enum. Type of document for stage. Either "guide" or "wiki". Currently "guide" is the only supported doctype.
- strictness— Optional enum. Determines what kind of releases invalidate stage completion. "major", "minor" or null.
- frequency_unit— Optional enum. The unit portion of the stage recurrence interval. "day", "week", "month", "year".
- frequency_quantity— Optional integer. Used along with frequency_unit to determine duration of stage recurrence interval.
Response
Status: 201 Created
{ "wikiid": 174, "langid": "en", "namespace": "COURSE", "title": "Machinist - Level 1", "revisionid": 460, "contents_raw": "The introduction course for machinist.", "contents_json": { "type": "doc", "content": [ { "type": "paragraph", "content": [ { "type": "text", "text": "The introduction course for machinist." } ] } ] }, "contents_rendered": "<p>The introduction course for machinist.<\/p>", "can_edit": true, "author": { "userid": 1, "banned": null, "username": "admin", "unique_username": null, "join_date": 1539302493, "image": null, "reputation": 200, "url": "https:\/\/site.com\/User\/1", "teams": [], "enabled": true }, "flags": [], "image": null, "documents": [], "publish_date": 1539241200, "created_date": 1539302493, "modified_date": null, "enabled": 1, "stages": [ { "course_stageid": 72, "docid": 2, "doctype": "guide", "doc_url": "\/Guide\/How+to+Calibrate+WIPS\/2", "orderby": 0, "strictness": "major", "title": "How to Calibrate WIPS", "frequency_quantity": 6, "frequency_unit": "month", "completion": null }, { "course_stageid": 73, "docid": 35, "doctype": "guide", "doc_url": "\/Guide\/CNC+Machine+Operation\/35", "orderby": 1, "strictness": "minor", "title": "CNC Machine Operation", "frequency_quantity": null, "frequency_unit": null, "completion": null }, { "course_stageid": 74, "docid": 37, "doctype": "guide", "doc_url": "\/Guide\/How+to+Set+Up+and+Use+the+Roll+Form+Machine\/37", "orderby": 2, "strictness": null, "title": "How to Set Up and Use the Roll Form Machine", "frequency_quantity": null, "frequency_unit": null, "completion": null } ], "assigneeCount": 18, "assignees": null, "completionPercent": 0, "viewUrl": "\/Courses\/View\/174" }
PATCH /courses/{wikiid}
Edit an existing course.
Route Parameters
- wikiid — Required — integer
-
Identifier for course being edited.
Request Body
- title — Optional — string
-
Title of course.
- contents — Optional — string
-
Description of course.
- publish_date — Optional — integer
-
Unix timestamp for publish date of course.
- enabled — Optional — boolean
-
Toggle for enabling/disabling a course.
- stages — Optional — array of objects
-
List of stages in a course.
- docid— Required integer. The identifier for the stage guide/wiki.
- doctype— Required enum. Type of document for stage. Either "guide" or "wiki". Currently "guide" is the only supported doctype.
- strictness— Optional enum. Determines what kind of releases invalidate stage completion. "major", "minor" or null.
- frequency_unit— Optional enum. The unit portion of the stage recurrence interval. "day", "week", "month", "year".
- frequency_quantity— Optional integer. Used along with frequency_unit to determine duration of stage recurrence interval.
Response
Status: 200 Ok
{ "wikiid": 174, "langid": "en", "namespace": "COURSE", "title": "Machinist - Level 1", "revisionid": 460, "contents_raw": "The introduction course for machinist.", "contents_json": { "type": "doc", "content": [ { "type": "paragraph", "content": [ { "type": "text", "text": "The introduction course for machinist." } ] } ] }, "contents_rendered": "<p>The introduction course for machinist.<\/p>", "can_edit": true, "author": { "userid": 1, "banned": null, "username": "admin", "unique_username": null, "join_date": 1539302493, "image": null, "reputation": 200, "url": "https:\/\/site.com\/User\/1", "teams": [], "enabled": true }, "flags": [], "image": null, "documents": [], "publish_date": 1539241200, "created_date": 1539302493, "modified_date": null, "enabled": 1, "stages": [ { "course_stageid": 72, "docid": 2, "doctype": "guide", "doc_url": "\/Guide\/How+to+Calibrate+WIPS\/2", "orderby": 0, "strictness": "major", "title": "How to Calibrate WIPS", "frequency_quantity": 6, "frequency_unit": "month", "completion": null }, { "course_stageid": 73, "docid": 35, "doctype": "guide", "doc_url": "\/Guide\/CNC+Machine+Operation\/35", "orderby": 1, "strictness": "minor", "title": "CNC Machine Operation", "frequency_quantity": null, "frequency_unit": null, "completion": null }, { "course_stageid": 74, "docid": 37, "doctype": "guide", "doc_url": "\/Guide\/How+to+Set+Up+and+Use+the+Roll+Form+Machine\/37", "orderby": 2, "strictness": null, "title": "How to Set Up and Use the Roll Form Machine", "frequency_quantity": null, "frequency_unit": null, "completion": null } ], "assigneeCount": 18, "assignees": null, "completionPercent": 0, "viewUrl": "\/Courses\/View\/174" }
PATCH /courses/{wikiid}/revert
Revert a course to the last non-deleted revision, or to a specified revision.
Route Parameters
- wikiid — Required — integer
-
Identifier for course being reverted.
Query Parameters
- to_revisionid — Optional — integer
-
Identifier for the target revision to revert to.
Response
Status: 200 Ok
{ "wikiid": 174, "langid": "en", "namespace": "COURSE", "title": "Machinist - Level 1", "revisionid": 460, "contents_raw": "The introduction course for machinist.", "contents_json": { "type": "doc", "content": [ { "type": "paragraph", "content": [ { "type": "text", "text": "The introduction course for machinist." } ] } ] }, "contents_rendered": "<p>The introduction course for machinist.<\/p>", "can_edit": true, "author": { "userid": 1, "banned": null, "username": "admin", "unique_username": null, "join_date": 1539302493, "image": null, "reputation": 200, "url": "https:\/\/site.com\/User\/1", "teams": [], "enabled": true }, "flags": [], "image": null, "documents": [], "publish_date": 1539241200, "created_date": 1539302493, "modified_date": null, "enabled": 1, "stages": [ { "course_stageid": 72, "docid": 2, "doctype": "guide", "doc_url": "\/Guide\/How+to+Calibrate+WIPS\/2", "orderby": 0, "strictness": "major", "title": "How to Calibrate WIPS", "frequency_quantity": 6, "frequency_unit": "month", "completion": null }, { "course_stageid": 73, "docid": 35, "doctype": "guide", "doc_url": "\/Guide\/CNC+Machine+Operation\/35", "orderby": 1, "strictness": "minor", "title": "CNC Machine Operation", "frequency_quantity": null, "frequency_unit": null, "completion": null }, { "course_stageid": 74, "docid": 37, "doctype": "guide", "doc_url": "\/Guide\/How+to+Set+Up+and+Use+the+Roll+Form+Machine\/37", "orderby": 2, "strictness": null, "title": "How to Set Up and Use the Roll Form Machine", "frequency_quantity": null, "frequency_unit": null, "completion": null } ], "assigneeCount": 18, "assignees": null, "completionPercent": 0, "viewUrl": "\/Courses\/View\/174" }
DELETE /courses/{wikiid}
Soft delete a course.
Route Parameters
- wikiid — Required — integer
-
Identifier for course being deleted.
Response
Status: 204 No Content