List Training Courses
GET https://api.suger.cloud/ai/org/{orgId}/prm/course
List training courses. With `tab` set to `mine` (the default) it lists the courses this organization authored, published or not, each with its status and module, lesson and duration counts; `from_partners` lists the published courses other organizations shared with this one. A course's `id` is the `courseId` GetCourse and ListCourseEnrollments take. A call returns 10 rows unless `limit` says otherwise (at most 100; a larger `limit`, up to 1000, returns only 100 rows and sends `offset` to the wrong page, and one over 1000 is refused): page by sending `limit` on every call with `offset` a multiple of it (0, `limit`, twice `limit`,...) until you have `total_count` rows, and filter with `q` on stored fields such as `name`, `category`, `kind` or `sharing_mode` (Private, All Partners, Specific Partners). The status and the counts are computed, so a `q` on them fails. For progress across all courses and partners, call GetPartnerTrainingProgress.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
orgId | path | string | yes | Organization ID |
tab | query | string | no | mine (default) or from_partners |
q | query | string | no | Filter: a LISP expression over the row's stored fields, written (= field "value"); combine conditions with (and...) |
s | query | string | no | Sort field; prefix with - for descending |
limit | query | integer | no | Rows to return (default 10, at most 100; a larger value, up to 1000, returns only 100 rows and sends `offset` to the wrong page; over 1000 is refused) |
offset | query | integer | no | Rows to skip, a multiple of `limit` and sent together with it |
Responses
200 — OK
Content-Type: application/json · Schema: ListBaseResponse-CourseSummary
ListBaseResponse-CourseSummary fields:
| Field | Type | Required | Description |
|---|---|---|---|
data | array<CourseSummary> | no | |
page_number | integer | no | |
page_size | integer | no | |
total_count | integer | no | TotalCount is the number of matching rows, counted up to ListCountCap. When TotalCountCapped is true it is that cap rather than the real total. |
total_count_capped | boolean | no | TotalCountCapped reports that more rows match than TotalCount says: the count stopped at ListCountCap because an exact total costs a full scan of everything the filter matches. Clients should present TotalCount as a lower bound ("10,000+") when this is set. Omitted when false, so clients that predate the field are unaffected. |
CourseSummary fields:
| Field | Type | Required | Description |
|---|---|---|---|
archivedAt | string | no | Set by the archive transition — course retired (hidden from catalog/new enrollment); pinned learners still continue per the access rule |
category | string | no | Optional listing tag, e.g. Co-Sell / Technical / Sales / Onboarding |
certificateIds | array<string> | no | Certificate IDs this course grants on pass (0..N). NOT NULL default '[]' in HCL = grants none. Read live at pass time (grant set is not version-pinned). |
completedCount | integer | no | |
createTime | string | no | Creation timestamp |
createdByUserId | string | no | Creator's user id |
createdByUserName | string | no | Creator display name |
currentPublishedVersionId | string | no | The live version. NULL = not published |
deletedAt | string | no | The time it was deleted; empty while it is active. |
description | string | no | Optional description (listing metadata — not versioned) |
draftVersionId | string | no | The working draft |
enrollmentCount | integer | no | Enrollment aggregates across ALL the course's versions, by derived status. On the "mine" tab these span every consumer org; on "from_partners" they are scoped to the caller's own org (its team's progress). Derived on read. |
estimatedMinutes | integer | no | |
externalDurationMin | integer | no | ExternalDurationMin is the owner's ESTIMATE of how long the external course takes. It is not observed and never rendered against a learner's row. |
externalProvider | string | no | ExternalProvider is the display name of the LMS an EXTERNAL course lives in ("Skilljar"), lifted out of the pinned version's destination so the catalog can label the row and its call-to-action ("Open in Skilljar") without fetching each course's version. Empty for native/scorm courses, and empty for an external course whose owner left the provider blank -- the client falls back to a generic label rather than inventing a vendor name. |
failedCount | integer | no | |
id | string | no | ID of the ent. Unique course identifier (UUID) |
inProgressCount | integer | no | |
kind | string | no | Content kind: native (BlockNote modules) | scorm (uploaded package). Immutable after create; drives publish gate, runtime, and the listing badge. |
lastUpdateTime | string | no | Last update timestamp |
lastUpdatedByUserId | string | no | User id of the last editor ("Updated By") |
lastUpdatedByUserName | string | no | last-editor display name |
lessonCount | integer | no | |
moduleCount | integer | no | ModuleCount / LessonCount / EstimatedMinutes are computed from the relevant version's info (current published if any, else the draft). |
name | string | no | Display name (listing metadata — not versioned) |
notStartedCount | integer | no | |
openedCount | integer | no | OpenedCount is the EXTERNAL-kind bucket: learners who followed the link out to the external LMS at least once. It is its own bucket rather than being folded into InProgressCount because Fours cannot observe progress inside another LMS. Every derived status must have a bucket here — the tally switch has a `default:` that silently counts an unrecognised status as Not Started, so a missing bucket under-reports with no compile error. |
previousVersionCount | integer | no | PreviousVersionCount is the number of older, immutable versions of this course — non-draft versions whose version_no is below the version shown in this row. Drives the My Courses "expand for version history" affordance: the disclosure is only offered when this is > 0. Derived on read. |
sharingMode | string | no | Private, All Partners, Specific Partners (Title-Case display values) |
sourceOrgId | string | no | Owner/author org — tenant isolation; "My Courses" = source_org_id = caller |
sourceOrgName | string | no | SourceOrgName is the owner org's display name, so the "From Partners" catalog can show "Shared by {org}". The embedded Course only carries source_org_id (the opaque ID). |
status | string | no | Status is derived: Archived if archived_at set; else Published if a current published version exists; else Draft. |
targetOrgId | array<string> | no | Recipient org IDs for specific_partners sharing |
versionNo | integer | no | VersionNo is the relevant version's human-readable number — the current PUBLISHED version when Published, else the draft. Resolved on read from the already-batch-loaded version (course_version.version_no), so the catalog can show "Published · v3" / "Draft · v1" unambiguously. 0 if unresolved. |
400 — Validation error
Content-Type: application/json
Example
Generated from this operation's schema. Values are placeholders —
substitute your own ids, and set SUGER_TOKEN to a bearer token
from the OAuth client-credentials exchange.
Request
curl -X GET 'https://api.suger.cloud/ai/org/{orgId}/prm/course' \
-H "Authorization: Bearer $SUGER_TOKEN" Response — 200
{
"data": [
{
"archivedAt": "string",
"category": "string",
"certificateIds": [
"01H0000000000000000000"
],
"completedCount": 1,
"createTime": "2026-01-31T12:00:00Z",
"createdByUserId": "01H0000000000000000000",
"createdByUserName": "Acme Corp",
"currentPublishedVersionId": "01H0000000000000000000",
"deletedAt": "string",
"description": "string",
"draftVersionId": "01H0000000000000000000",
"enrollmentCount": 1
}
],
"page_number": 1,
"page_size": 1,
"total_count": 1,
"total_count_capped": true
} Error — 400
"string" View as Markdown · API reference overview
Spotted something wrong or out of date on this page? Tell us and we'll correct it.